diff --git a/database/socket/client/dial_test.go b/database/socket/client/dial_test.go index d85496d..9cb8178 100644 --- a/database/socket/client/dial_test.go +++ b/database/socket/client/dial_test.go @@ -12,7 +12,7 @@ import ( func TestConnectError(t *testing.T) { assert := assert.New(t) assert.Panics(func() { - Dial("unix", "/tmp/yanic-database-error.socket") + Dial("tcp6", "[::]:30303") }, "could connect") } @@ -20,12 +20,12 @@ func TestRecieveMessages(t *testing.T) { assert := assert.New(t) server, err := socket.Connect(map[string]interface{}{ "enable": true, - "type": "unix", - "address": "/tmp/yanic-database.socket", + "type": "tcp6", + "address": "[::]:1337", }) assert.NoError(err) - d := Dial("unix", "/tmp/yanic-database.socket") + d := Dial("tcp6", "[::]:1337") assert.NotNil(d) go d.Start() time.Sleep(5 * time.Millisecond) diff --git a/database/socket/database_test.go b/database/socket/database_test.go index ed3272b..c1c88bc 100644 --- a/database/socket/database_test.go +++ b/database/socket/database_test.go @@ -26,8 +26,8 @@ func TestStartup(t *testing.T) { assert.Error(err, "connection should not work") assert.Nil(conn) - config["type"] = "unix" - config["address"] = "/tmp/yanic-database.socket" + config["type"] = "tcp6" + config["address"] = "[::]:1337" conn, err = Connect(config) assert.NoError(err, "connection should work") @@ -42,14 +42,14 @@ func TestClient(t *testing.T) { config := make(map[string]interface{}) config["enable"] = true - config["type"] = "unix" - config["address"] = "/tmp/yanic-database2.socket" + config["type"] = "tcp6" + config["address"] = "[::]:1337" conn, err := Connect(config) assert.NoError(err, "connection should work") assert.NotNil(conn) - client, err := net.Dial("unix", "/tmp/yanic-database2.socket") + client, err := net.Dial("tcp6", "[::]:1337") assert.NoError(err, "connection should work") assert.NotNil(client) time.Sleep(time.Duration(3) * time.Microsecond)