File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -481,19 +481,23 @@ async fn update_overwrites_programs_display_version() {
481481 const PLACEHOLDER_VERSION : & str = "9.999.99" ;
482482 let version = env ! ( "CARGO_PKG_VERSION" ) ;
483483
484- let cx = SelfUpdateTestContext :: new ( TEST_VERSION ) . await ;
485- let _guard = RegistryGuard :: new ( & USER_RUSTUP_VERSION ) . unwrap ( ) ;
484+ let mut cx = SelfUpdateTestContext :: new ( TEST_VERSION ) . await ;
485+ let guard = RegistryGuard :: new ( [ & USER_PATH , & USER_RUSTUP_VERSION ] ) . unwrap ( ) ;
486+ cx. config . set_registry_uuid ( guard. uuid ( ) ) ;
486487 cx. config
487488 . expect ( [ "rustup-init" , "-y" , "--no-modify-path" ] )
488489 . await
489490 . is_ok ( ) ;
490491
491492 USER_RUSTUP_VERSION
492- . set ( Some ( & Value :: from ( PLACEHOLDER_VERSION ) ) )
493+ . set ( Some ( & Value :: from ( PLACEHOLDER_VERSION ) ) , Some ( guard . uuid ( ) ) )
493494 . unwrap ( ) ;
494495 cx. config . expect ( [ "rustup" , "self" , "update" ] ) . await . is_ok ( ) ;
495496 assert_eq ! (
496- USER_RUSTUP_VERSION . get( ) . unwrap( ) . unwrap( ) ,
497+ USER_RUSTUP_VERSION
498+ . get( Some ( guard. uuid( ) ) )
499+ . unwrap( )
500+ . unwrap( ) ,
497501 Value :: from( version)
498502 ) ;
499503}
You can’t perform that action at this time.
0 commit comments