MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_get_status_disabled_server

Function test_get_status_disabled_server

core/src/mcp/manager.rs:717–738  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

715
716 #[tokio::test]
717 async fn test_get_status_disabled_server() {
718 use std::collections::HashMap;
719 let manager = McpManager::new();
720
721 let config = McpServerConfig {
722 name: "disabled_server".to_string(),
723 transport: McpTransportConfig::Stdio {
724 command: "echo".to_string(),
725 args: vec![],
726 },
727 enabled: false,
728 env: HashMap::new(),
729 oauth: None,
730 tool_timeout_secs: 60,
731 };
732
733 manager.register_server(config).await;
734
735 let status = manager.get_status().await;
736 assert!(status.contains_key("disabled_server"));
737 assert!(!status["disabled_server"].enabled);
738 }
739
740 #[tokio::test]
741 async fn test_get_all_tools_empty_manager() {

Callers

nothing calls this directly

Calls 2

register_serverMethod · 0.80
get_statusMethod · 0.80

Tested by

no test coverage detected