Skip to content

Commit 338807a

Browse files
committed
fix the unauthorized test
1 parent a36b030 commit 338807a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

nexus/tests/integration_tests/endpoints.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2597,6 +2597,25 @@ pub static VERIFY_ENDPOINTS: LazyLock<Vec<VerifyEndpoint>> =
25972597
AllowedMethod::Delete,
25982598
],
25992599
},
2600+
/* Tokens */
2601+
VerifyEndpoint {
2602+
url: "/v1/me/tokens",
2603+
visibility: Visibility::Public,
2604+
unprivileged_access: UnprivilegedAccess::ReadOnly,
2605+
allowed_methods: vec![AllowedMethod::Get],
2606+
},
2607+
// Creating the resource here with SetupReqs is more complicated
2608+
// than with other resources because it's a multi-step process where
2609+
// later steps depend on earlier ones, so for now we will be lazy
2610+
// and opt out.
2611+
2612+
// VerifyEndpoint {
2613+
// url: "/v1/me/tokens/token-id",
2614+
// visibility: Visibility::Public,
2615+
// unprivileged_access: UnprivilegedAccess::None,
2616+
// allowed_methods: vec![AllowedMethod::Delete],
2617+
// },
2618+
26002619
/* Certificates */
26012620
VerifyEndpoint {
26022621
url: &DEMO_CERTIFICATES_URL,

nexus/tests/output/uncovered-authz-endpoints.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
API endpoints with no coverage in authz tests:
22
probe_delete (delete "/experimental/v1/probes/{probe}")
3+
current_user_token_delete (delete "/v1/me/tokens/{token_id}")
34
probe_list (get "/experimental/v1/probes")
45
probe_view (get "/experimental/v1/probes/{probe}")
56
support_bundle_download (get "/experimental/v1/system/support-bundles/{bundle_id}/download")

0 commit comments

Comments
 (0)