()
| 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() { |
nothing calls this directly
no test coverage detected