Skip to content

Commit 7e375bf

Browse files
committed
fix the unauthorized test
1 parent 5e2b32d commit 7e375bf

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
@@ -2594,6 +2594,25 @@ pub static VERIFY_ENDPOINTS: LazyLock<Vec<VerifyEndpoint>> =
25942594
AllowedMethod::Delete,
25952595
],
25962596
},
2597+
/* Tokens */
2598+
VerifyEndpoint {
2599+
url: "/v1/me/tokens",
2600+
visibility: Visibility::Public,
2601+
unprivileged_access: UnprivilegedAccess::ReadOnly,
2602+
allowed_methods: vec![AllowedMethod::Get],
2603+
},
2604+
// Creating the resource here with SetupReqs is more complicated
2605+
// than with other resources because it's a multi-step process where
2606+
// later steps depend on earlier ones, so for now we will be lazy
2607+
// and opt out.
2608+
2609+
// VerifyEndpoint {
2610+
// url: "/v1/me/tokens/token-id",
2611+
// visibility: Visibility::Public,
2612+
// unprivileged_access: UnprivilegedAccess::None,
2613+
// allowed_methods: vec![AllowedMethod::Delete],
2614+
// },
2615+
25972616
/* Certificates */
25982617
VerifyEndpoint {
25992618
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)