aboutsummaryrefslogtreecommitdiffstats
path: root/internal/storage
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2024-01-10 22:01:56 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2024-01-10 22:01:56 -0500
commit0a0b911a15202214ee0421a6d71ed6a84f1461c9 (patch)
tree4e7d7e534ecd3ddff13bfee5c702dc6c1703d7db /internal/storage
parentFix fs repo create and tweak tests (diff)
downloadcli-0a0b911a15202214ee0421a6d71ed6a84f1461c9.zip
Tweak tests
Diffstat (limited to 'internal/storage')
-rw-r--r--internal/storage/db_test.go8
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"`)
}