diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2024-01-10 22:01:56 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2024-01-10 22:01:56 -0500 |
| commit | 0a0b911a15202214ee0421a6d71ed6a84f1461c9 (patch) | |
| tree | 4e7d7e534ecd3ddff13bfee5c702dc6c1703d7db /internal/storage | |
| parent | Fix fs repo create and tweak tests (diff) | |
| download | cli-0a0b911a15202214ee0421a6d71ed6a84f1461c9.zip | |
Tweak tests
Diffstat (limited to 'internal/storage')
| -rw-r--r-- | internal/storage/db_test.go | 8 |
1 files changed, 3 insertions, 5 deletions
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"`) } |