(t *testing.T)
| 223 | } |
| 224 | |
| 225 | func TestClientWriteNotConnected(t *testing.T) { |
| 226 | c := NewClient(Config{Caster: "localhost:2101", Mountpoint: "/M", Password: "p"}) |
| 227 | _, err := c.Write([]byte("data")) |
| 228 | require.Error(t, err) |
| 229 | require.Contains(t, err.Error(), "not connected") |
| 230 | } |
| 231 | |
| 232 | func TestClientWriteForwarding(t *testing.T) { |
| 233 | client, server := net.Pipe() |