(t *testing.T)
| 274 | } |
| 275 | |
| 276 | func TestClientConnectDialFailure(t *testing.T) { |
| 277 | c := NewClient(Config{ |
| 278 | Caster: "localhost:1", |
| 279 | Mountpoint: "/M", |
| 280 | Password: "p", |
| 281 | }) |
| 282 | |
| 283 | ctx := context.Background() |
| 284 | err := c.Connect(ctx) |
| 285 | require.Error(t, err) |
| 286 | require.Contains(t, err.Error(), "dialing caster") |
| 287 | } |
| 288 | |
| 289 | func TestClientConnectFullHandshake(t *testing.T) { |
| 290 | listener, err := net.Listen("tcp", "127.0.0.1:0") |