From 0a0b911a15202214ee0421a6d71ed6a84f1461c9 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Wed, 10 Jan 2024 22:01:56 -0500 Subject: Tweak tests --- internal/storage/db_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'internal/storage') diff --git a/internal/storage/db_test.go b/internal/storage/db_test.go index 377c8c8..d9e22d0 100644 --- a/internal/storage/db_test.go +++ b/internal/storage/db_test.go @@ -11,8 +11,7 @@ import ( ) func TestDBConnectWithPostgres(t *testing.T) { - cfg, err := bolttest.NewTestConnectionConfig("postgres") - assert.NilError(t, err) + cfg := bolttest.NewTestConnectionConfig(t, "postgres") conn, err := storage.DBConnect(cfg.Driver, storage.DBConnectionString(cfg)) assert.NilError(t, err) @@ -28,10 +27,9 @@ func TestDBConnectMalformedConnectionString(t *testing.T) { } func TestDBConnectUnsupportedDriver(t *testing.T) { - cfg, err := bolttest.NewTestConnectionConfig("redis") - assert.NilError(t, err) + cfg := bolttest.NewTestConnectionConfig(t, "redis") - _, err = storage.DBConnect(cfg.Driver, storage.DBConnectionString(cfg)) + _, err := storage.DBConnect(cfg.Driver, storage.DBConnectionString(cfg)) assert.ErrorContains(t, err, `unknown driver "redis"`) } -- cgit v1.2.3