diff --git a/dev-tools/reconfigurator-cli/tests/test_basic.rs b/dev-tools/reconfigurator-cli/tests/test_basic.rs index 1ae78487a3..ae3707657d 100644 --- a/dev-tools/reconfigurator-cli/tests/test_basic.rs +++ b/dev-tools/reconfigurator-cli/tests/test_basic.rs @@ -9,6 +9,7 @@ use nexus_db_queries::authn; use nexus_db_queries::authz; use nexus_db_queries::context::OpContext; use nexus_test_utils::SLED_AGENT_UUID; +use nexus_test_utils::resource_helpers::DiskTestBuilder; use nexus_test_utils_macros::nexus_test; use nexus_types::deployment::Blueprint; use nexus_types::deployment::UnstableReconfiguratorState; @@ -20,6 +21,7 @@ use omicron_test_utils::dev::test_cmds::path_to_executable; use omicron_test_utils::dev::test_cmds::redact_variable; use omicron_test_utils::dev::test_cmds::run_command; use omicron_test_utils::dev::test_cmds::EXIT_SUCCESS; +use omicron_uuid_kinds::GenericUuid; use omicron_uuid_kinds::SledUuid; use slog::debug; use std::io::BufReader; @@ -56,6 +58,24 @@ type ControlPlaneTestContext = #[nexus_test] async fn test_blueprint_edit(cptestctx: &ControlPlaneTestContext) { // Setup + // + // Add a zpool to both sleds, just to ensure that all new zones can find + // a transient filesystem wherever they end up being placed. + let _sled_agent_zpools = DiskTestBuilder::new(&cptestctx) + .on_sled(SledUuid::from_untyped_uuid( + cptestctx.sled_agent.sled_agent.id, + )) + .with_zpool_count(1) + .build() + .await; + let _sled_agent2_zpools = DiskTestBuilder::new(&cptestctx) + .on_sled(SledUuid::from_untyped_uuid( + cptestctx.sled_agent2.sled_agent.id, + )) + .with_zpool_count(1) + .build() + .await; + let nexus = &cptestctx.server.server_context().nexus; let datastore = nexus.datastore(); let log = &cptestctx.logctx.log; @@ -155,7 +175,7 @@ async fn test_blueprint_edit(cptestctx: &ControlPlaneTestContext) { // Load the new file and find the new blueprint name. let state2: UnstableReconfiguratorState = read_json(&saved_state2_path).unwrap(); - assert_eq!(state2.blueprints.len(), state1.blueprints.len() + 1); + assert_eq!(state2.blueprints.len(), state1.blueprints.len() + 1); // XXX let new_blueprint = state2.blueprints.into_iter().rev().next().unwrap(); assert_ne!(new_blueprint.id, blueprint.id);