diff options
author | Liam Murphy <43807659+Liamolucko@users.noreply.github.com> | 2020-12-22 02:30:59 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-21 16:30:59 +0100 |
commit | 4033b390367e025e73c851a6ce7021631b27e3c0 (patch) | |
tree | b514ea2bedcc3215e3c82dbaac4ade87ff2087c1 | |
parent | b1c2d219353edafa2bdc95ac2b4dbab5d4b7f459 (diff) |
refactor: rewrite chown_test.ts not to depend on python (#8843)
This commit rewrites "chown_test.ts" to use the GNU "id" command
instead of python. This won't work on Windows, but these tests aren't
currently run on Windows anyway.
-rw-r--r-- | cli/tests/unit/chown_test.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/tests/unit/chown_test.ts b/cli/tests/unit/chown_test.ts index acdb736cb..d85f5d3b2 100644 --- a/cli/tests/unit/chown_test.ts +++ b/cli/tests/unit/chown_test.ts @@ -12,11 +12,11 @@ async function getUidAndGid(): Promise<{ uid: number; gid: number }> { // get the user ID and group ID of the current process const uidProc = Deno.run({ stdout: "piped", - cmd: ["python", "-c", "import os; print(os.getuid())"], + cmd: ["id", "-u"], }); const gidProc = Deno.run({ stdout: "piped", - cmd: ["python", "-c", "import os; print(os.getgid())"], + cmd: ["id", "-g"], }); assertEquals((await uidProc.status()).code, 0); |