diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:41:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:41:41 +0000 |
commit | 5d920465245906e2250c288c2b1ffea608a37539 (patch) | |
tree | 8d52f82e5d4a1717f136c7e5f6c389464c403e79 /tests/sla_test.go | |
parent | Releasing progress-linux version 1.1.1-2~progress7.99u1. (diff) | |
download | icingadb-5d920465245906e2250c288c2b1ffea608a37539.tar.xz icingadb-5d920465245906e2250c288c2b1ffea608a37539.zip |
Merging upstream version 1.2.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/sla_test.go')
-rw-r--r-- | tests/sla_test.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/sla_test.go b/tests/sla_test.go index 6fa3a0e..597f5a0 100644 --- a/tests/sla_test.go +++ b/tests/sla_test.go @@ -18,15 +18,14 @@ import ( ) func TestSla(t *testing.T) { - m := it.MysqlDatabaseT(t) - m.ImportIcingaDbSchema() + rdb := getDatabase(t) r := it.RedisServerT(t) i := it.Icinga2NodeT(t, "master") i.EnableIcingaDb(r) err := i.Reload() require.NoError(t, err, "icinga2 should reload without error") - it.IcingaDbInstanceT(t, r, m) + it.IcingaDbInstanceT(t, r, rdb) client := i.ApiClient() @@ -109,8 +108,8 @@ func TestSla(t *testing.T) { assert.Equal(t, 3, len(stateChanges), "there should be three hard state changes") - db, err := sqlx.Connect("mysql", m.DSN()) - require.NoError(t, err, "connecting to mysql") + db, err := sqlx.Connect(rdb.Driver(), rdb.DSN()) + require.NoError(t, err, "connecting to database") defer func() { _ = db.Close() }() type Row struct { @@ -248,8 +247,8 @@ func TestSla(t *testing.T) { End int64 `db:"downtime_end"` } - db, err := sqlx.Connect("mysql", m.DSN()) - require.NoError(t, err, "connecting to mysql") + db, err := sqlx.Connect(rdb.Driver(), rdb.DSN()) + require.NoError(t, err, "connecting to database") defer func() { _ = db.Close() }() if !o.Fixed { |