Test basic mcp-cli commands.
()
| 59 | |
| 60 | |
| 61 | def test_basic_commands(): |
| 62 | """Test basic mcp-cli commands.""" |
| 63 | print("\n" + "=" * 50) |
| 64 | print("🧪 Testing Basic MCP CLI Commands") |
| 65 | print("=" * 50) |
| 66 | |
| 67 | tests = [ |
| 68 | (["--help"], "Help command"), |
| 69 | (["tools", "--help"], "Tools help"), |
| 70 | (["servers", "--help"], "Servers help"), |
| 71 | (["provider", "--help"], "Provider help"), |
| 72 | (["models", "--help"], "Models help"), |
| 73 | ] |
| 74 | |
| 75 | results = [] |
| 76 | for args, description in tests: |
| 77 | print(f"\n📝 {description}") |
| 78 | success, stdout, stderr = test_mcp_cli_command(args, timeout=10) |
| 79 | |
| 80 | if success: |
| 81 | print(f"✅ PASS: {description}") |
| 82 | else: |
| 83 | print(f"❌ FAIL: {description}") |
| 84 | if stderr: |
| 85 | print(f" Error: {stderr[:200]}...") |
| 86 | |
| 87 | results.append((description, success)) |
| 88 | |
| 89 | return results |
| 90 | |
| 91 | |
| 92 | def test_server_commands(config_file="server_config.json"): |
no test coverage detected