From 41ce3e4fac7d7aacc449d4b20faf826460ba3b37 Mon Sep 17 00:00:00 2001 From: Noah Hilverling Date: Mon, 29 Jul 2019 13:43:46 +0200 Subject: [PATCH] Change unit-test server address --- connection/mysql_test.go | 4 ++-- connection/redis_pubsub_test.go | 2 +- connection/redis_test.go | 14 +++++++------- ha/heartbeat_test.go | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/connection/mysql_test.go b/connection/mysql_test.go index d3c09a98..266debe4 100644 --- a/connection/mysql_test.go +++ b/connection/mysql_test.go @@ -156,7 +156,7 @@ func TestDBWrapper_SqlBegin(t *testing.T) { } func TestDBWrapper_SqlTransaction(t *testing.T) { - dbw, err := NewDBWrapper( "module-dev:icinga0815!@tcp(10.77.27.18:3306)/icingadb") + dbw, err := NewDBWrapper( "module-dev:icinga0815!@tcp(10.77.27.16:3306)/icingadb") assert.NoError(t, err, "Is the MySQL server running?") err = dbw.SqlTransaction(false, true, false, func(tx DbTransaction) error { @@ -287,7 +287,7 @@ func TestGetConnectionCheckInterval(t *testing.T) { } func TestDBWrapper_SqlFetchAll(t *testing.T) { - dbw, err := NewDBWrapper("module-dev:icinga0815!@tcp(10.77.27.18:3306)/icingadb") + dbw, err := NewDBWrapper("module-dev:icinga0815!@tcp(10.77.27.16:3306)/icingadb") assert.NoError(t, err, "Is the MySQL server running?") _, err = dbw.Db.Exec("CREATE TABLE testing0815 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(255) NOT NULL)") diff --git a/connection/redis_pubsub_test.go b/connection/redis_pubsub_test.go index 2d72dae5..bb18a747 100644 --- a/connection/redis_pubsub_test.go +++ b/connection/redis_pubsub_test.go @@ -9,7 +9,7 @@ import ( func TestPubSubWrapper(t *testing.T) { rdb := redis.NewClient(&redis.Options{ - Addr: "10.77.27.18:6379", + Addr: "10.77.27.16:6379", DialTimeout: time.Minute / 2, ReadTimeout: time.Minute, WriteTimeout: time.Minute, diff --git a/connection/redis_test.go b/connection/redis_test.go index d40de1fc..533f54ca 100644 --- a/connection/redis_test.go +++ b/connection/redis_test.go @@ -16,7 +16,7 @@ func NewTestRDBW(rdb RedisClient) RDBWrapper { } func TestNewRDBWrapper(t *testing.T) { - _, err := NewRDBWrapper("10.77.27.18:6379") + _, err := NewRDBWrapper("10.77.27.16:6379") assert.NoError(t, err, "Redis should be connected") _, err = NewRDBWrapper("asdasdasdasdasd:5123") @@ -60,7 +60,7 @@ func TestRDBWrapper_CheckConnection(t *testing.T) { rdbw := NewTestRDBW(nil) rdbw.Rdb = redis.NewClient(&redis.Options{ - Addr: "10.77.27.18:6379", + Addr: "10.77.27.16:6379", DialTimeout: time.Minute / 2, ReadTimeout: time.Minute, WriteTimeout: time.Minute, @@ -86,7 +86,7 @@ func TestRDBWrapper_CheckConnection(t *testing.T) { func TestRDBWrapper_HGetAll(t *testing.T) { rdb := redis.NewClient(&redis.Options{ - Addr: "10.77.27.18:6379", + Addr: "10.77.27.16:6379", DialTimeout: time.Minute / 2, ReadTimeout: time.Minute, WriteTimeout: time.Minute, @@ -124,7 +124,7 @@ func TestRDBWrapper_HGetAll(t *testing.T) { func TestRDBWrapper_XRead(t *testing.T) { rdb := redis.NewClient(&redis.Options{ - Addr: "10.77.27.18:6379", + Addr: "10.77.27.16:6379", DialTimeout: time.Minute / 2, ReadTimeout: time.Minute, WriteTimeout: time.Minute, @@ -162,7 +162,7 @@ func TestRDBWrapper_XRead(t *testing.T) { func TestRDBWrapper_XDel(t *testing.T) { rdb := redis.NewClient(&redis.Options{ - Addr: "10.77.27.18:6379", + Addr: "10.77.27.16:6379", DialTimeout: time.Minute / 2, ReadTimeout: time.Minute, WriteTimeout: time.Minute, @@ -197,7 +197,7 @@ func TestRDBWrapper_XDel(t *testing.T) { func TestRDBWrapper_Publish(t *testing.T) { rdb := redis.NewClient(&redis.Options{ - Addr: "10.77.27.18:6379", + Addr: "10.77.27.16:6379", DialTimeout: time.Minute / 2, ReadTimeout: time.Minute, WriteTimeout: time.Minute, @@ -233,7 +233,7 @@ func TestRDBWrapper_Publish(t *testing.T) { func TestRDBWrapper_TxPipelined(t *testing.T) { rdb := redis.NewClient(&redis.Options{ - Addr: "10.77.27.18:6379", + Addr: "10.77.27.16:6379", DialTimeout: time.Minute / 2, ReadTimeout: time.Minute, WriteTimeout: time.Minute, diff --git a/ha/heartbeat_test.go b/ha/heartbeat_test.go index 9e17d757..08cc1b61 100644 --- a/ha/heartbeat_test.go +++ b/ha/heartbeat_test.go @@ -16,7 +16,7 @@ var icingastate = "{\"IcingaApplication\":" + "}}}}}" func TestIcingaEventsBroker(t *testing.T) { - rdb, err := connection.NewRDBWrapper("10.77.27.18:6379") + rdb, err := connection.NewRDBWrapper("10.77.27.16:6379") if err != nil { t.Fatal("This test needs a working Redis connection") }