From 65b25dc5b6434ede2dc89766e621adbf982ed64d Mon Sep 17 00:00:00 2001 From: Levon Tarver Date: Thu, 4 Jul 2024 19:06:04 +0000 Subject: [PATCH] fix address lot testing --- nexus/tests/integration_tests/endpoints.rs | 11 +---------- nexus/tests/integration_tests/unauthorized.rs | 13 +++++++++++++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/nexus/tests/integration_tests/endpoints.rs b/nexus/tests/integration_tests/endpoints.rs index 11a60a9aa4..85888975d6 100644 --- a/nexus/tests/integration_tests/endpoints.rs +++ b/nexus/tests/integration_tests/endpoints.rs @@ -2232,7 +2232,7 @@ pub static VERIFY_ENDPOINTS: Lazy> = Lazy::new(|| { VerifyEndpoint { url: &DEMO_ADDRESS_LOT_BLOCKS_URL, - visibility: Visibility::Public, + visibility: Visibility::Protected, unprivileged_access: UnprivilegedAccess::None, allowed_methods: vec![ AllowedMethod::Post( @@ -2251,15 +2251,6 @@ pub static VERIFY_ENDPOINTS: Lazy> = Lazy::new(|| { ] }, - VerifyEndpoint { - url: &DEMO_ADDRESS_LOT_BLOCKS_URL, - visibility: Visibility::Protected, - unprivileged_access: UnprivilegedAccess::None, - allowed_methods: vec![ - AllowedMethod::GetNonexistent - ], - }, - VerifyEndpoint { url: &DEMO_LOOPBACK_CREATE_URL, visibility: Visibility::Public, diff --git a/nexus/tests/integration_tests/unauthorized.rs b/nexus/tests/integration_tests/unauthorized.rs index 93e40dbc2e..1d7018e271 100644 --- a/nexus/tests/integration_tests/unauthorized.rs +++ b/nexus/tests/integration_tests/unauthorized.rs @@ -214,6 +214,19 @@ static SETUP_REQUESTS: Lazy> = Lazy::new(|| { &*DEMO_SILO_USER_ID_SET_PASSWORD_URL, ], }, + // Create the default Address Lot + SetupReq::Post { + url: &DEMO_ADDRESS_LOTS_URL, + body: serde_json::to_value(&*DEMO_ADDRESS_LOT_CREATE).unwrap(), + id_routes: vec!["/v1/system/networking/address-lot/{id}"], + }, + // Create the default Address Lot Block + SetupReq::Post { + url: &DEMO_ADDRESS_LOT_BLOCKS_URL, + body: serde_json::to_value(&*DEMO_ADDRESS_LOT_BLOCK_CREATE) + .unwrap(), + id_routes: vec![], + }, // Create the default IP pool SetupReq::Post { url: &DEMO_IP_POOLS_URL,