From 49c9927e0ded36582872f52b0c9bfda7996a0a1f Mon Sep 17 00:00:00 2001 From: David Crespo Date: Wed, 18 Oct 2023 12:06:08 -0500 Subject: [PATCH] unauthorized test --- nexus/tests/integration_tests/endpoints.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nexus/tests/integration_tests/endpoints.rs b/nexus/tests/integration_tests/endpoints.rs index 0f7a0d6070..11878a175e 100644 --- a/nexus/tests/integration_tests/endpoints.rs +++ b/nexus/tests/integration_tests/endpoints.rs @@ -467,6 +467,13 @@ lazy_static! { description: Some(String::from("a new IP pool")), }, }; + pub static ref DEMO_IP_POOL_ASSOC_URL: String = format!("{}/associate", *DEMO_IP_POOL_URL); + pub static ref DEMO_IP_POOL_ASSOC_BODY: params::IpPoolResource = + params::IpPoolResource { + resource_id: DEFAULT_SILO.identity().id, + resource_type: params::IpPoolResourceType::Silo, + is_default: false, + }; pub static ref DEMO_IP_POOL_RANGE: IpRange = IpRange::V4(Ipv4Range::new( std::net::Ipv4Addr::new(10, 0, 0, 0), std::net::Ipv4Addr::new(10, 0, 0, 255), @@ -767,6 +774,16 @@ lazy_static! { ], }, + // IP pool resource association endpoint + VerifyEndpoint { + url: &DEMO_IP_POOL_ASSOC_URL, + visibility: Visibility::Protected, + unprivileged_access: UnprivilegedAccess::None, + allowed_methods: vec![ + AllowedMethod::Post(serde_json::to_value(&*DEMO_IP_POOL_ASSOC_BODY).unwrap()) + ], + }, + // IP Pool ranges endpoint VerifyEndpoint { url: &DEMO_IP_POOL_RANGES_URL,