Skip to content

Commit

Permalink
Adjust some quotas in hopes of not failing all the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zephraph committed Dec 7, 2023
1 parent 55ff0b2 commit 2ee6d36
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
8 changes: 6 additions & 2 deletions nexus/db-queries/src/db/datastore/rack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ mod test {
};
use omicron_common::api::external::http_pagination::PaginatedBy;
use omicron_common::api::external::{
IdentityMetadataCreateParams, MacAddr,
ByteCount, IdentityMetadataCreateParams, MacAddr,
};
use omicron_common::api::internal::shared::SourceNatConfig;
use omicron_common::nexus_config::NUM_INITIAL_RESERVED_IP_ADDRESSES;
Expand Down Expand Up @@ -912,7 +912,11 @@ mod test {
name: "test-silo".parse().unwrap(),
description: String::new(),
},
quotas: external_params::SiloQuotasCreate::empty(),
quotas: external_params::SiloQuotasCreate {
cpus: 128,
memory: ByteCount::from_gibibytes_u32(1000),
storage: ByteCount::from_gibibytes_u32(1000000),
},
discoverable: false,
identity_mode: SiloIdentityMode::LocalOnly,
admin_group_name: None,
Expand Down
9 changes: 6 additions & 3 deletions nexus/db-queries/src/db/fixed_data/silo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use crate::db;
use lazy_static::lazy_static;
use nexus_types::external_api::{params, shared};
use omicron_common::api::external::IdentityMetadataCreateParams;
use omicron_common::api::external::{ByteCount, IdentityMetadataCreateParams};

lazy_static! {
pub static ref SILO_ID: uuid::Uuid = "001de000-5110-4000-8000-000000000000"
Expand All @@ -24,8 +24,11 @@ lazy_static! {
name: "default-silo".parse().unwrap(),
description: "default silo".to_string(),
},
// TODO: Should the default silo have a quota? If so, what should the defaults be?
quotas: params::SiloQuotasCreate::empty(),
quotas: params::SiloQuotasCreate {
cpus: 128,
memory: ByteCount::from_gibibytes_u32(1000),
storage: ByteCount::from_gibibytes_u32(1000000),
},
discoverable: false,
identity_mode: shared::SiloIdentityMode::LocalOnly,
admin_group_name: None,
Expand Down
4 changes: 2 additions & 2 deletions nexus/test-utils/src/resource_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ pub async fn create_silo(
description: "a silo".to_string(),
},
quotas: params::SiloQuotasCreate {
cpus: 36,
cpus: 128,
memory: ByteCount::from_gibibytes_u32(1000),
storage: ByteCount::from_gibibytes_u32(100000),
storage: ByteCount::from_gibibytes_u32(1000000),
},
discoverable,
identity_mode,
Expand Down
4 changes: 2 additions & 2 deletions nexus/tests/integration_tests/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ lazy_static! {
},
quotas: params::SiloQuotasCreate {
cpus: 100,
memory: ByteCount::from_gibibytes_u32(100),
storage: ByteCount::from_gibibytes_u32(100),
memory: ByteCount::from_gibibytes_u32(1000),
storage: ByteCount::from_gibibytes_u32(100000),
},
discoverable: true,
identity_mode: shared::SiloIdentityMode::SamlJit,
Expand Down

0 comments on commit 2ee6d36

Please sign in to comment.