@@ -1988,6 +1988,7 @@ mod tests {
19881988 use nexus_reconfigurator_planning:: blueprint_builder:: Ensure ;
19891989 use nexus_reconfigurator_planning:: blueprint_builder:: EnsureMultiple ;
19901990 use nexus_reconfigurator_planning:: example:: example;
1991+ use nexus_reconfigurator_planning:: planner:: disks_editor:: BlueprintDisksEditor ;
19911992 use nexus_types:: deployment:: blueprint_zone_type;
19921993 use nexus_types:: deployment:: BlueprintZoneConfig ;
19931994 use nexus_types:: deployment:: BlueprintZoneDisposition ;
@@ -2322,18 +2323,17 @@ mod tests {
23222323 "test" ,
23232324 )
23242325 . expect ( "failed to create builder" ) ;
2326+ let mut disks_editor = BlueprintDisksEditor :: new ( & blueprint1) ;
23252327
23262328 // Ensure disks on our sled
23272329 assert_eq ! (
2328- builder
2329- . sled_ensure_disks(
2330- new_sled_id,
2331- & planning_input
2332- . sled_lookup( SledFilter :: Commissioned , new_sled_id)
2333- . unwrap( )
2334- . resources,
2335- )
2336- . unwrap( ) ,
2330+ disks_editor. sled_ensure_disks(
2331+ new_sled_id,
2332+ & planning_input
2333+ . sled_lookup( SledFilter :: Commissioned , new_sled_id)
2334+ . unwrap( )
2335+ . resources,
2336+ ) ,
23372337 EnsureMultiple :: Changed {
23382338 added: 4 ,
23392339 updated: 0 ,
@@ -2360,7 +2360,7 @@ mod tests {
23602360 let num_new_crucible_zones = new_sled_zpools. len ( ) ;
23612361 let num_new_sled_zones = num_new_ntp_zones + num_new_crucible_zones;
23622362
2363- let blueprint2 = builder. build ( ) ;
2363+ let blueprint2 = builder. build ( disks_editor ) ;
23642364 let authz_blueprint2 = authz_blueprint_from_id ( blueprint2. id ) ;
23652365
23662366 let diff = blueprint2. diff_since_blueprint ( & blueprint1) ;
@@ -2514,7 +2514,7 @@ mod tests {
25142514 "test2" ,
25152515 )
25162516 . expect ( "failed to create builder" )
2517- . build ( ) ;
2517+ . build ( BlueprintDisksEditor :: new ( & blueprint1 ) ) ;
25182518 let blueprint3 = BlueprintBuilder :: new_based_on (
25192519 & logctx. log ,
25202520 & blueprint1,
@@ -2523,7 +2523,7 @@ mod tests {
25232523 "test3" ,
25242524 )
25252525 . expect ( "failed to create builder" )
2526- . build ( ) ;
2526+ . build ( BlueprintDisksEditor :: new ( & blueprint1 ) ) ;
25272527 assert_eq ! ( blueprint1. parent_blueprint_id, None ) ;
25282528 assert_eq ! ( blueprint2. parent_blueprint_id, Some ( blueprint1. id) ) ;
25292529 assert_eq ! ( blueprint3. parent_blueprint_id, Some ( blueprint1. id) ) ;
@@ -2623,7 +2623,7 @@ mod tests {
26232623 "test3" ,
26242624 )
26252625 . expect ( "failed to create builder" )
2626- . build ( ) ;
2626+ . build ( BlueprintDisksEditor :: new ( & blueprint3 ) ) ;
26272627 assert_eq ! ( blueprint4. parent_blueprint_id, Some ( blueprint3. id) ) ;
26282628 datastore. blueprint_insert ( & opctx, & blueprint4) . await . unwrap ( ) ;
26292629 let bp4_target = BlueprintTarget {
@@ -2668,7 +2668,7 @@ mod tests {
26682668 "test2" ,
26692669 )
26702670 . expect ( "failed to create builder" )
2671- . build ( ) ;
2671+ . build ( BlueprintDisksEditor :: new ( & blueprint1 ) ) ;
26722672 assert_eq ! ( blueprint1. parent_blueprint_id, None ) ;
26732673 assert_eq ! ( blueprint2. parent_blueprint_id, Some ( blueprint1. id) ) ;
26742674
@@ -2896,7 +2896,7 @@ mod tests {
28962896 "test2" ,
28972897 )
28982898 . expect ( "failed to create builder" )
2899- . build ( ) ;
2899+ . build ( BlueprintDisksEditor :: new ( & blueprint1 ) ) ;
29002900
29012901 // Insert both into the blueprint table.
29022902 datastore. blueprint_insert ( & opctx, & blueprint1) . await . unwrap ( ) ;
0 commit comments