From 4033b390367e025e73c851a6ce7021631b27e3c0 Mon Sep 17 00:00:00 2001 From: Liam Murphy <43807659+Liamolucko@users.noreply.github.com> Date: Tue, 22 Dec 2020 02:30:59 +1100 Subject: 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. --- cli/tests/unit/chown_test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli') 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); -- cgit v1.2.3