@@ -450,10 +450,16 @@ mod test {
450450 // With a target blueprint having no zones, the task should trivially
451451 // complete and report a successful (empty) summary.
452452 let generation = Generation :: new ( ) ;
453- let blueprint = Arc :: new (
454- create_blueprint ( & datastore, & opctx, BTreeMap :: new ( ) , generation)
455- . await ,
456- ) ;
453+ let blueprint = {
454+ let ( target, blueprint) = create_blueprint (
455+ & datastore,
456+ & opctx,
457+ BTreeMap :: new ( ) ,
458+ generation,
459+ )
460+ . await ;
461+ ( target, Arc :: new ( blueprint) )
462+ } ;
457463 let blueprint_id = blueprint. 1 . id ;
458464 blueprint_tx. send ( Some ( blueprint) ) . unwrap ( ) ;
459465 let mut value = task. activate ( & opctx) . await ;
@@ -541,7 +547,9 @@ mod test {
541547 . expect ( "failed to upsert zpool" ) ;
542548 }
543549
544- blueprint_tx. send ( Some ( Arc :: new ( blueprint. clone ( ) ) ) ) . unwrap ( ) ;
550+ blueprint_tx
551+ . send ( Some ( ( blueprint. 0 , Arc :: new ( blueprint. 1 . clone ( ) ) ) ) )
552+ . unwrap ( ) ;
545553
546554 // Make sure that requests get made to the sled agent.
547555 for s in [ & mut s1, & mut s2] {
@@ -584,7 +592,9 @@ mod test {
584592 blueprint. 1 . internal_dns_version =
585593 blueprint. 1 . internal_dns_version . next ( ) ;
586594 blueprint. 0 . enabled = false ;
587- blueprint_tx. send ( Some ( Arc :: new ( blueprint. clone ( ) ) ) ) . unwrap ( ) ;
595+ blueprint_tx
596+ . send ( Some ( ( blueprint. 0 , Arc :: new ( blueprint. 1 . clone ( ) ) ) ) )
597+ . unwrap ( ) ;
588598 let value = task. activate ( & opctx) . await ;
589599 println ! ( "when disabled: {:?}" , value) ;
590600 assert_eq ! (
@@ -607,7 +617,9 @@ mod test {
607617 // Do it all again, but configure one of the servers to fail so we can
608618 // verify the task's returned summary of what happened.
609619 blueprint. 0 . enabled = true ;
610- blueprint_tx. send ( Some ( Arc :: new ( blueprint) ) ) . unwrap ( ) ;
620+ blueprint_tx
621+ . send ( Some ( ( blueprint. 0 , Arc :: new ( blueprint. 1 . clone ( ) ) ) ) )
622+ . unwrap ( ) ;
611623 s1. expect (
612624 Expectation :: matching ( match_put_omicron_config ( ) )
613625 . respond_with ( status_code ( 204 ) ) ,
0 commit comments