MCPcopy Create free account
hub / github.com/dtormoen/tsk-tsk / test_is_proxy_running_false

Function test_is_proxy_running_false

src/docker/proxy_manager.rs:1291–1311  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1289
1290 #[tokio::test]
1291 async fn test_is_proxy_running_false() {
1292 use serde_json::json;
1293
1294 let mock_client = Arc::new(TrackedDockerClient {
1295 inspect_container_response: json!({
1296 "State": {
1297 "Running": false
1298 }
1299 })
1300 .to_string(),
1301 ..Default::default()
1302 });
1303
1304 let ctx = AppContext::builder().build();
1305
1306 let manager = ProxyManager::new(mock_client, ctx.tsk_env(), ContainerEngine::Docker, None);
1307 let result = manager.is_proxy_running("tsk-proxy-test").await;
1308
1309 assert!(result.is_ok());
1310 assert!(!result.unwrap());
1311 }
1312
1313 #[tokio::test]
1314 async fn test_count_connected_agents() {

Callers

nothing calls this directly

Calls 3

tsk_envMethod · 0.80
is_proxy_runningMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected