()
| 160 | |
| 161 | #[tokio::test] |
| 162 | async fn test_handshake_with_auth() { |
| 163 | let mock = MockWorker::bind().await; |
| 164 | let addr = mock.addr(); |
| 165 | let key = "test-cluster-key-123"; |
| 166 | let key_owned = key.to_string(); |
| 167 | let worker = tokio::spawn(async move { mock.handle_one(Some(&key_owned)).await }); |
| 168 | |
| 169 | let (stream, info) = connect_and_handshake(addr, Some(key)).await; |
| 170 | assert_eq!(info.device, "cpu"); |
| 171 | |
| 172 | drop(stream); |
| 173 | let _ = worker.await; |
| 174 | } |
| 175 | |
| 176 | #[tokio::test] |
| 177 | async fn test_handshake_auth_wrong_key() { |
nothing calls this directly
no test coverage detected