@@ -1362,9 +1362,9 @@ async fn test_deploy_proxy_with_network_specific_addresses() {
13621362 copy_dir ( & project_dir, tmp_dir. path ( ) ) . unwrap ( ) ;
13631363 patch_manifest_file_with_path_std ( tmp_dir. path ( ) ) . unwrap ( ) ;
13641364
1365- // Configure network-specific proxy addresses
1365+ // Configure network-specific proxy addresses - but don't include address for "local" network
1366+ // so it will deploy a new proxy and add it to the manifest
13661367 let mut addresses = std:: collections:: BTreeMap :: new ( ) ;
1367- addresses. insert ( "local" . to_string ( ) , "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" . to_string ( ) ) ;
13681368 addresses. insert ( "testnet" . to_string ( ) , "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321" . to_string ( ) ) ;
13691369
13701370 let proxy = Proxy {
@@ -1395,18 +1395,19 @@ async fn test_deploy_proxy_with_network_specific_addresses() {
13951395 ..Default :: default ( )
13961396 } ;
13971397
1398- // This should use the "local" network address from the addresses table
1398+ // This should deploy a new proxy since no "local" network address exists
13991399 let contract_ids = deploy ( cmd) . await . unwrap ( ) ;
14001400 node. kill ( ) . unwrap ( ) ;
14011401
1402- // Verify proxy was used and updated
1402+ // Verify proxy was deployed
14031403 let deployed_contract = expect_deployed_contract ( contract_ids. into_iter ( ) . next ( ) . unwrap ( ) ) ;
14041404 assert ! ( deployed_contract. proxy. is_some( ) ) ;
14051405
1406- // Verify the manifest was updated with network-specific address
1406+ // Verify the manifest was updated with network-specific address for local network
14071407 let updated_toml = fs:: read_to_string ( tmp_dir. path ( ) . join ( "Forc.toml" ) ) . unwrap ( ) ;
14081408 assert ! ( updated_toml. contains( "[proxy.addresses]" ) ) ;
14091409 assert ! ( updated_toml. contains( "local" ) ) ;
1410+ assert ! ( updated_toml. contains( "testnet" ) ) ; // Original address should still be there
14101411}
14111412
14121413#[ tokio:: test]
0 commit comments