diff options
author | Luca Casonato <hello@lcas.dev> | 2024-09-10 20:12:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-10 11:12:24 -0700 |
commit | 7bfcb4dd10d31f5f9566c90a28449c0951f3a48e (patch) | |
tree | fca0dec6e98118418f1712c6e8451a04c7e89988 /tests/testdata | |
parent | be5419d479fcae16c8a07dec00ce11b532b7996a (diff) |
feat(cli): use NotCapable error for permission errors (#25431)
Closes #7394
---------
Co-authored-by: snek <snek@deno.com>
Diffstat (limited to 'tests/testdata')
-rw-r--r-- | tests/testdata/bench/allow_none.out | 12 | ||||
-rw-r--r-- | tests/testdata/bench/no_prompt_by_default.out | 2 | ||||
-rw-r--r-- | tests/testdata/bench/no_prompt_with_denied_perms.out | 2 | ||||
-rw-r--r-- | tests/testdata/npm/deno_run_cowsay_no_permissions.out | 2 | ||||
-rw-r--r-- | tests/testdata/run/059_fs_relative_path_perm.ts.out | 2 | ||||
-rw-r--r-- | tests/testdata/run/089_run_allow_list.ts.out | 2 | ||||
-rw-r--r-- | tests/testdata/run/node_env_var_allowlist.ts.out | 2 | ||||
-rw-r--r-- | tests/testdata/test/allow_none.out | 12 | ||||
-rw-r--r-- | tests/testdata/test/no_prompt_by_default.out | 2 | ||||
-rw-r--r-- | tests/testdata/test/no_prompt_with_denied_perms.out | 2 |
10 files changed, 20 insertions, 20 deletions
diff --git a/tests/testdata/bench/allow_none.out b/tests/testdata/bench/allow_none.out index 9499e234a..2a75ab5fd 100644 --- a/tests/testdata/bench/allow_none.out +++ b/tests/testdata/bench/allow_none.out @@ -6,16 +6,16 @@ Runtime | Deno [WILDCARD] ([WILDCARD]) benchmark time/iter (avg) iter/s (min … max) p75 p99 p995 ----------- ----------------------------- --------------------- -------------------------- -read error: PermissionDenied: Can't escalate parent thread permissions +read error: NotCapable: Can't escalate parent thread permissions [WILDCARD] -write error: PermissionDenied: Can't escalate parent thread permissions +write error: NotCapable: Can't escalate parent thread permissions [WILDCARD] -net error: PermissionDenied: Can't escalate parent thread permissions +net error: NotCapable: Can't escalate parent thread permissions [WILDCARD] -env error: PermissionDenied: Can't escalate parent thread permissions +env error: NotCapable: Can't escalate parent thread permissions [WILDCARD] -run error: PermissionDenied: Can't escalate parent thread permissions +run error: NotCapable: Can't escalate parent thread permissions [WILDCARD] -ffi error: PermissionDenied: Can't escalate parent thread permissions +ffi error: NotCapable: Can't escalate parent thread permissions [WILDCARD] error: Bench failed diff --git a/tests/testdata/bench/no_prompt_by_default.out b/tests/testdata/bench/no_prompt_by_default.out index 3a2574e28..d9e83cf25 100644 --- a/tests/testdata/bench/no_prompt_by_default.out +++ b/tests/testdata/bench/no_prompt_by_default.out @@ -5,6 +5,6 @@ Runtime | Deno [WILDCARD] ([WILDCARD]) benchmark time/iter (avg) iter/s (min … max) p75 p99 p995 ----------- ----------------------------- --------------------- -------------------------- -no prompt error: PermissionDenied: Requires read access to "./some_file.txt", run again with the --allow-read flag +no prompt error: NotCapable: Requires read access to "./some_file.txt", run again with the --allow-read flag [WILDCARD] error: Bench failed diff --git a/tests/testdata/bench/no_prompt_with_denied_perms.out b/tests/testdata/bench/no_prompt_with_denied_perms.out index 0d1e41077..81db3068a 100644 --- a/tests/testdata/bench/no_prompt_with_denied_perms.out +++ b/tests/testdata/bench/no_prompt_with_denied_perms.out @@ -5,6 +5,6 @@ Runtime | Deno [WILDCARD] ([WILDCARD]) benchmark time/iter (avg) iter/s (min … max) p75 p99 p995 ----------- ----------------------------- --------------------- -------------------------- -no prompt error: PermissionDenied: Requires read access to "./some_file.txt", run again with the --allow-read flag +no prompt error: NotCapable: Requires read access to "./some_file.txt", run again with the --allow-read flag [WILDCARD] error: Bench failed diff --git a/tests/testdata/npm/deno_run_cowsay_no_permissions.out b/tests/testdata/npm/deno_run_cowsay_no_permissions.out index 837394d49..6434620e2 100644 --- a/tests/testdata/npm/deno_run_cowsay_no_permissions.out +++ b/tests/testdata/npm/deno_run_cowsay_no_permissions.out @@ -1,2 +1,2 @@ -error: Uncaught PermissionDenied: Requires read access to <CWD>, specify the required permissions during compilation using `deno compile --allow-read` +error: Uncaught NotCapable: Requires read access to <CWD>, specify the required permissions during compilation using `deno compile --allow-read` [WILDCARD] diff --git a/tests/testdata/run/059_fs_relative_path_perm.ts.out b/tests/testdata/run/059_fs_relative_path_perm.ts.out index b23628cd6..0d0412208 100644 --- a/tests/testdata/run/059_fs_relative_path_perm.ts.out +++ b/tests/testdata/run/059_fs_relative_path_perm.ts.out @@ -1,4 +1,4 @@ -[WILDCARD]error: Uncaught (in promise) PermissionDenied: Requires read access to "non-existent", run again with the --allow-read flag +[WILDCARD]error: Uncaught (in promise) NotCapable: Requires read access to "non-existent", run again with the --allow-read flag Deno.readFileSync("non-existent"); ^ at [WILDCARD] diff --git a/tests/testdata/run/089_run_allow_list.ts.out b/tests/testdata/run/089_run_allow_list.ts.out index 68a4a2ac5..8b07d6e04 100644 --- a/tests/testdata/run/089_run_allow_list.ts.out +++ b/tests/testdata/run/089_run_allow_list.ts.out @@ -1,3 +1,3 @@ -[WILDCARD]PermissionDenied: Requires run access to "ls", run again with the --allow-run flag +[WILDCARD]NotCapable: Requires run access to "ls", run again with the --allow-run flag [WILDCARD] true diff --git a/tests/testdata/run/node_env_var_allowlist.ts.out b/tests/testdata/run/node_env_var_allowlist.ts.out index ea66a2965..2dcffd67b 100644 --- a/tests/testdata/run/node_env_var_allowlist.ts.out +++ b/tests/testdata/run/node_env_var_allowlist.ts.out @@ -1,5 +1,5 @@ ok -[WILDCARD]error: Uncaught (in promise) PermissionDenied: Requires env access to "NOT_NODE_DEBUG", run again with the --allow-env flag +[WILDCARD]error: Uncaught (in promise) NotCapable: Requires env access to "NOT_NODE_DEBUG", run again with the --allow-env flag Deno.env.get("NOT_NODE_DEBUG"); ^ at [WILDCARD] diff --git a/tests/testdata/test/allow_none.out b/tests/testdata/test/allow_none.out index aaea9aea3..37ed8548a 100644 --- a/tests/testdata/test/allow_none.out +++ b/tests/testdata/test/allow_none.out @@ -10,27 +10,27 @@ ffi ... FAILED [WILDCARD] ERRORS read => ./test/allow_none.ts:[WILDCARD] -error: PermissionDenied: Can't escalate parent thread permissions +error: NotCapable: Can't escalate parent thread permissions [WILDCARD] write => ./test/allow_none.ts:[WILDCARD] -error: PermissionDenied: Can't escalate parent thread permissions +error: NotCapable: Can't escalate parent thread permissions [WILDCARD] net => ./test/allow_none.ts:[WILDCARD] -error: PermissionDenied: Can't escalate parent thread permissions +error: NotCapable: Can't escalate parent thread permissions [WILDCARD] env => ./test/allow_none.ts:[WILDCARD] -error: PermissionDenied: Can't escalate parent thread permissions +error: NotCapable: Can't escalate parent thread permissions [WILDCARD] run => ./test/allow_none.ts:[WILDCARD] -error: PermissionDenied: Can't escalate parent thread permissions +error: NotCapable: Can't escalate parent thread permissions [WILDCARD] ffi => ./test/allow_none.ts:[WILDCARD] -error: PermissionDenied: Can't escalate parent thread permissions +error: NotCapable: Can't escalate parent thread permissions [WILDCARD] FAILURES diff --git a/tests/testdata/test/no_prompt_by_default.out b/tests/testdata/test/no_prompt_by_default.out index a35e3f7ae..cd40fab53 100644 --- a/tests/testdata/test/no_prompt_by_default.out +++ b/tests/testdata/test/no_prompt_by_default.out @@ -4,7 +4,7 @@ no prompt ... FAILED ([WILDCARD]s) ERRORS no prompt => ./test/no_prompt_by_default.ts:[WILDCARD] -error: PermissionDenied: Requires read access to "./some_file.txt", run again with the --allow-read flag +error: NotCapable: Requires read access to "./some_file.txt", run again with the --allow-read flag [WILDCARD] FAILURES diff --git a/tests/testdata/test/no_prompt_with_denied_perms.out b/tests/testdata/test/no_prompt_with_denied_perms.out index 4293ff1bb..f6c8ec826 100644 --- a/tests/testdata/test/no_prompt_with_denied_perms.out +++ b/tests/testdata/test/no_prompt_with_denied_perms.out @@ -4,7 +4,7 @@ no prompt ... FAILED ([WILDCARD]s) ERRORS no prompt => ./test/no_prompt_with_denied_perms.ts:[WILDCARD] -error: PermissionDenied: Requires read access to "./some_file.txt", run again with the --allow-read flag +error: NotCapable: Requires read access to "./some_file.txt", run again with the --allow-read flag [WILDCARD] FAILURES |