diff options
Diffstat (limited to 'cli/tests/unit/chown_test.ts')
-rw-r--r-- | cli/tests/unit/chown_test.ts | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/cli/tests/unit/chown_test.ts b/cli/tests/unit/chown_test.ts index 447f1bde0..60cb45959 100644 --- a/cli/tests/unit/chown_test.ts +++ b/cli/tests/unit/chown_test.ts @@ -40,7 +40,10 @@ unitTest( ); unitTest( - { perms: { run: true, write: true }, ignore: Deno.build.os == "windows" }, + { + permissions: { run: true, write: true }, + ignore: Deno.build.os == "windows", + }, async function chownSyncFileNotExist() { const { uid, gid } = await getUidAndGid(); const filePath = Deno.makeTempDirSync() + "/chown_test_file.txt"; @@ -52,7 +55,10 @@ unitTest( ); unitTest( - { perms: { run: true, write: true }, ignore: Deno.build.os == "windows" }, + { + permissions: { run: true, write: true }, + ignore: Deno.build.os == "windows", + }, async function chownFileNotExist() { const { uid, gid } = await getUidAndGid(); const filePath = (await Deno.makeTempDir()) + "/chown_test_file.txt"; @@ -64,7 +70,7 @@ unitTest( ); unitTest( - { perms: { write: true }, ignore: Deno.build.os == "windows" }, + { permissions: { write: true }, ignore: Deno.build.os == "windows" }, function chownSyncPermissionDenied() { const dirPath = Deno.makeTempDirSync(); const filePath = dirPath + "/chown_test_file.txt"; @@ -79,7 +85,7 @@ unitTest( ); unitTest( - { perms: { write: true }, ignore: Deno.build.os == "windows" }, + { permissions: { write: true }, ignore: Deno.build.os == "windows" }, async function chownPermissionDenied() { const dirPath = await Deno.makeTempDir(); const filePath = dirPath + "/chown_test_file.txt"; @@ -94,7 +100,10 @@ unitTest( ); unitTest( - { perms: { run: true, write: true }, ignore: Deno.build.os == "windows" }, + { + permissions: { run: true, write: true }, + ignore: Deno.build.os == "windows", + }, async function chownSyncSucceed() { // TODO(bartlomieju): when a file's owner is actually being changed, // chown only succeeds if run under priviledged user (root) @@ -114,7 +123,10 @@ unitTest( ); unitTest( - { perms: { run: true, write: true }, ignore: Deno.build.os == "windows" }, + { + permissions: { run: true, write: true }, + ignore: Deno.build.os == "windows", + }, async function chownSyncWithUrl() { const { uid, gid } = await getUidAndGid(); const dirPath = Deno.makeTempDirSync(); @@ -126,7 +138,10 @@ unitTest( ); unitTest( - { perms: { run: true, write: true }, ignore: Deno.build.os == "windows" }, + { + permissions: { run: true, write: true }, + ignore: Deno.build.os == "windows", + }, async function chownSucceed() { const { uid, gid } = await getUidAndGid(); const dirPath = await Deno.makeTempDir(); @@ -138,7 +153,10 @@ unitTest( ); unitTest( - { perms: { run: true, write: true }, ignore: Deno.build.os == "windows" }, + { + permissions: { run: true, write: true }, + ignore: Deno.build.os == "windows", + }, async function chownUidOnly() { const { uid } = await getUidAndGid(); const dirPath = await Deno.makeTempDir(); @@ -150,7 +168,10 @@ unitTest( ); unitTest( - { perms: { run: true, write: true }, ignore: Deno.build.os == "windows" }, + { + permissions: { run: true, write: true }, + ignore: Deno.build.os == "windows", + }, async function chownWithUrl() { // TODO(bartlomieju): same as chownSyncSucceed const { uid, gid } = await getUidAndGid(); |