diff options
Diffstat (limited to 'internal/storage/db_test.go')
| -rw-r--r-- | internal/storage/db_test.go | 5 |
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) { |