Skip to content

Commit

Permalink
unauthorized test
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed Oct 18, 2023
1 parent 9b4edaa commit 49c9927
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions nexus/tests/integration_tests/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 49c9927

Please sign in to comment.