@@ -31,6 +31,11 @@ public class AzureMigrateCommandTests(ITestOutputHelper output, TestProxyFixture
3131 [ Fact ]
3232 public async Task Should_check_platform_landing_zone_exists ( )
3333 {
34+ if ( await AssertLocalToolIsUnavailableInHttpMode ( ) )
35+ {
36+ return ;
37+ }
38+
3439 var result = await CallToolAsync (
3540 "azuremigrate_platformlandingzone_request" ,
3641 new ( )
@@ -54,6 +59,11 @@ public async Task Should_check_platform_landing_zone_exists()
5459 [ Fact ]
5560 public async Task Should_update_platform_landing_zone_parameters ( )
5661 {
62+ if ( await AssertLocalToolIsUnavailableInHttpMode ( ) )
63+ {
64+ return ;
65+ }
66+
5767 var result = await CallToolAsync (
5868 "azuremigrate_platformlandingzone_request" ,
5969 new ( )
@@ -84,6 +94,11 @@ public async Task Should_update_platform_landing_zone_parameters()
8494 [ Fact ]
8595 public async Task Should_get_parameter_status ( )
8696 {
97+ if ( await AssertLocalToolIsUnavailableInHttpMode ( ) )
98+ {
99+ return ;
100+ }
101+
87102 var result = await CallToolAsync (
88103 "azuremigrate_platformlandingzone_request" ,
89104 new ( )
@@ -104,6 +119,11 @@ public async Task Should_get_parameter_status()
104119 [ Fact ]
105120 public async Task Should_handle_invalid_action ( )
106121 {
122+ if ( await AssertLocalToolIsUnavailableInHttpMode ( ) )
123+ {
124+ return ;
125+ }
126+
107127 try
108128 {
109129 await CallToolAsync (
@@ -123,4 +143,17 @@ await CallToolAsync(
123143 Assert . Contains ( "Invalid action" , ex . Message , StringComparison . OrdinalIgnoreCase ) ;
124144 }
125145 }
146+
147+ private async Task < bool > AssertLocalToolIsUnavailableInHttpMode ( )
148+ {
149+ if ( ! string . Equals ( Environment . GetEnvironmentVariable ( "MCP_TEST_TRANSPORT" ) , "http" , StringComparison . OrdinalIgnoreCase ) )
150+ {
151+ return false ;
152+ }
153+
154+ var result = await Client . CallToolAsync ( "azuremigrate_platformlandingzone_request" , new Dictionary < string , object ? > ( ) ) ;
155+ Assert . True ( result . IsError ) ;
156+ Assert . Contains ( "not found" , McpTestUtilities . GetFirstText ( result . Content ) , StringComparison . OrdinalIgnoreCase ) ;
157+ return true ;
158+ }
126159}
0 commit comments