Skip to content

Commit 9a195da

Browse files
committed
Refactor MCP command tests: Remove redundant print statements and enhance verification messages
1 parent b02ba4f commit 9a195da

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

e2etests/tests/mcp/test_kiro_cli_mcp_subcommand.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ fn test_kiro_cli_mcp_import_help_subcommand() -> Result<(), Box<dyn std::error::
100100
assert!(response.contains("--force"), "Missing --force option");
101101
assert!(response.contains("-v") && response.contains("--verbose"), "Missing --verbose option");
102102
assert!(response.contains("-h") && response.contains("--help"), "Missing --help option");
103-
println!("✅ Found all options with descriptions");
104103

105104
println!("✅ All kiro-cli mcp import --help content verified successfully");
106105

@@ -178,7 +177,6 @@ fn test_kiro_cli_mcp_status_help_subcommand() -> Result<(), Box<dyn std::error::
178177
assert!(response.contains("--name"), "Missing --name option");
179178
assert!(response.contains("-v") && response.contains("--verbose") , "Missing --verbose option");
180179
assert!(response.contains("-h") && response.contains("--help"), "Missing --help option");
181-
println!("✅ Found all options with descriptions");
182180

183181
println!("✅ All kiro-cli mcp status --help content verified successfully");
184182

@@ -254,7 +252,8 @@ fn test_add_and_remove_mcp_subcommand() -> Result<(), Box<dyn std::error::Error>
254252

255253
// Verify successful removal
256254
assert!(remove_response.contains("Removed") && remove_response.contains("'aws-documentation'"), "Missing removal success message");
257-
println!("✅ Found successful removal message");
255+
256+
println!("kiro-cli mcp add and remove subcommands verified successfully");
258257

259258
Ok(())
260259
}
@@ -316,7 +315,6 @@ fn test_kiro_cli_mcp_status_subcommand() -> Result<(), Box<dyn std::error::Error
316315

317316
// Verify successful addition
318317
assert!(response.contains("Added") && response.contains("'aws-documentation'"), "Missing success message");
319-
println!("✅ Found successful addition message");
320318

321319
// Allow the tool execution
322320
let response = q_chat_helper::execute_q_subcommand("kiro-cli", &["mcp", "status", "--name", "aws-documentation"])?;
@@ -344,7 +342,8 @@ fn test_kiro_cli_mcp_status_subcommand() -> Result<(), Box<dyn std::error::Error
344342

345343
// Verify successful removal
346344
assert!(response.contains("Removed") && response.contains("'aws-documentation'"), "Missing removal success message");
347-
println!("✅ Found successful removal message");
345+
346+
println!("kiro-cli mcp status command verified successfully");
348347

349348
Ok(())
350349
}

e2etests/tests/mcp/test_mcp_command.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,16 @@ fn test_mcp_help_command() -> Result<(), Box<dyn std::error::Error>> {
1818

1919
// Verify description
2020
assert!(response.contains("See mcp server loaded"), "Missing mcp server description");
21-
println!("✅ Found mcp server description");
2221

2322
// Verify Usage section
2423
assert!(response.contains("Usage"), "Missing Usage section");
25-
assert!(response.contains("/mcp"), "Missing /mcp command in usage section");
26-
println!("✅ Found Usage section with /mcp command");
24+
assert!(response.contains("/mcp"), "Missing /mcp command in usage section");;
2725

2826
// Verify Options section
2927
assert!(response.contains("Options"), "Missing Options section");
30-
println!("✅ Found Options section");
3128

3229
// Verify help flags
3330
assert!(response.contains("-h") && response.contains("--help") && response.contains("Print help"), "Missing -h, --help flags");
34-
println!("✅ Found help flags: -h, --help with Print help description");
3531

3632
println!("✅ All mcp help content verified!");
3733

@@ -66,7 +62,7 @@ fn test_mcp_loading_command() -> Result<(), Box<dyn std::error::Error>> {
6662
} else if response.contains("loading") {
6763
println!("✅ MCPs are still loading");
6864
} else {
69-
println!("ℹ️ MCP status unclear - may be in different state");
65+
println!("No MCP servers installed");
7066
}
7167

7268
println!("✅ All MCP loading content verified!");

0 commit comments

Comments
 (0)