summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/process_test.ts96
1 files changed, 0 insertions, 96 deletions
diff --git a/tests/unit/process_test.ts b/tests/unit/process_test.ts
index 799c8d12c..a35362d09 100644
--- a/tests/unit/process_test.ts
+++ b/tests/unit/process_test.ts
@@ -583,102 +583,6 @@ Deno.test({ permissions: { run: true, read: true } }, function killFailed() {
});
Deno.test(
- { permissions: { run: true, read: true, env: true } },
- async function clearEnv(): Promise<void> {
- // deno-lint-ignore no-deprecated-deno-api
- const p = Deno.run({
- cmd: [
- Deno.execPath(),
- "eval",
- "-p",
- "JSON.stringify(Deno.env.toObject())",
- ],
- stdout: "piped",
- clearEnv: true,
- env: {
- FOO: "23147",
- },
- });
-
- const obj = JSON.parse(new TextDecoder().decode(await p.output()));
-
- // can't check for object equality because the OS may set additional env
- // vars for processes, so we check if PATH isn't present as that is a common
- // env var across OS's and isn't set for processes.
- assertEquals(obj.FOO, "23147");
- assert(!("PATH" in obj));
-
- p.close();
- },
-);
-
-Deno.test(
- {
- permissions: { run: true, read: true },
- ignore: Deno.build.os === "windows",
- },
- async function uid(): Promise<void> {
- // deno-lint-ignore no-deprecated-deno-api
- const p = Deno.run({
- cmd: [
- "id",
- "-u",
- ],
- stdout: "piped",
- });
-
- const currentUid = new TextDecoder().decode(await p.output());
- p.close();
-
- if (currentUid !== "0") {
- assertThrows(() => {
- // deno-lint-ignore no-deprecated-deno-api
- Deno.run({
- cmd: [
- "echo",
- "fhqwhgads",
- ],
- uid: 0,
- });
- }, Deno.errors.PermissionDenied);
- }
- },
-);
-
-Deno.test(
- {
- permissions: { run: true, read: true },
- ignore: Deno.build.os === "windows",
- },
- async function gid(): Promise<void> {
- // deno-lint-ignore no-deprecated-deno-api
- const p = Deno.run({
- cmd: [
- "id",
- "-g",
- ],
- stdout: "piped",
- });
-
- const currentGid = new TextDecoder().decode(await p.output());
- p.close();
-
- if (currentGid !== "0") {
- assertThrows(() => {
- // deno-lint-ignore no-deprecated-deno-api
- Deno.run({
- cmd: [
- "echo",
- "fhqwhgads",
- ],
- gid: 0,
- });
- }, Deno.errors.PermissionDenied);
- }
- },
-);
-
-Deno.test(
{
permissions: { run: true, read: true, write: true },
ignore: Deno.build.os === "windows",