17 lines
339 B
Go
17 lines
339 B
Go
package echo_go
|
|
|
|
import "testing"
|
|
|
|
func TestCanConnect(t *testing.T) {
|
|
client, err := New("127.0.0.1:16000", "EchoGoTest")
|
|
if err != nil {
|
|
t.Fatalf("failed to create client: %v", err)
|
|
}
|
|
|
|
err = client.HandshakeLoop("mypassword", "4.0.0")
|
|
if err != nil {
|
|
t.Fatalf("failed to run handshake loop: %v", err)
|
|
}
|
|
|
|
client.Disconnect()
|
|
}
|