aboutsummaryrefslogtreecommitdiffstats
path: root/internal/storage/db_test.go
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2024-03-09 10:41:46 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2024-03-09 10:41:46 -0500
commit64b73944a6849c0b376bffa33b44f9ee6ac20a51 (patch)
tree55c55aaf83eb829d1c522ce173bf1d1edd8de019 /internal/storage/db_test.go
parentRelease v0.3.0 (diff)
downloadcli-64b73944a6849c0b376bffa33b44f9ee6ac20a51.zip
Replace lib/pq with pgx
Diffstat (limited to 'internal/storage/db_test.go')
-rw-r--r--internal/storage/db_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/storage/db_test.go b/internal/storage/db_test.go
index e85cc57..eaf9dfe 100644
--- a/internal/storage/db_test.go
+++ b/internal/storage/db_test.go
@@ -24,15 +24,14 @@ func TestDBConnect_Success(t *testing.T) {
func TestDBConnect_BadConnectionString(t *testing.T) {
_, err := storage.DBConnect("postgres", "pizza=123")
assert.ErrorIs(t, err, storage.ErrUnableToConnect)
- assert.ErrorContains(t, err, "connection refused")
+ assert.ErrorContains(t, err, "unable to open connection to database")
}
func TestDBConnect_UnsupportedDriver(t *testing.T) {
cfg := bolttest.NewTestConnectionConfig(t, "redis")
_, err := storage.DBConnect(cfg.Driver, storage.DBConnectionString(cfg))
- assert.ErrorIs(t, err, storage.ErrMalformedConnectionString)
- assert.ErrorContains(t, err, `unknown driver "redis"`)
+ assert.ErrorIs(t, err, storage.ErrUnsupportedDriver)
}
func TestDBConnectionString(t *testing.T) {