diff options
author | Will Chandler <wchandler@gitlab.com> | 2023-10-23 19:16:24 +0300 |
---|---|---|
committer | Will Chandler <wchandler@gitlab.com> | 2023-10-23 19:16:24 +0300 |
commit | f518ad6e5799727f90d554b9a7b2e87751933e2e (patch) | |
tree | 0d8cb083c5dd55ae7b1fd53eeb70128ae51b8d38 | |
parent | 07a8c29c95a3bdaa5b091bbcdc46e2ba507301d9 (diff) | |
parent | 748cec83e34717a475f79149e06f8214065f9b4f (diff) |
Merge branch 'smh-fix-resolving-error-test' into 'master'
Remove name resolving error test
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6488
Merged-by: Will Chandler <wchandler@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
-rw-r--r-- | internal/praefect/datastore/glsql/postgres_test.go | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/internal/praefect/datastore/glsql/postgres_test.go b/internal/praefect/datastore/glsql/postgres_test.go index 8a6bad1a6..37db4f04b 100644 --- a/internal/praefect/datastore/glsql/postgres_test.go +++ b/internal/praefect/datastore/glsql/postgres_test.go @@ -22,16 +22,6 @@ func TestOpenDB(t *testing.T) { dbCfg := testdb.GetConfig(t, "postgres") ctx := testhelper.Context(t) - t.Run("failed to ping because of incorrect config", func(t *testing.T) { - badCfg := dbCfg - badCfg.Host = "not-existing.com" - _, err := glsql.OpenDB(ctx, badCfg) - require.Error(t, err) - // The regexp is used because error message has a diff in local run an on CI. - const errRegexp = "send ping: failed to connect to `host=not\\-existing.com user=.* database=.*`: hostname resolving error" - require.Regexp(t, errRegexp, err.Error(), "opening of DB with incorrect configuration must fail") - }) - t.Run("timeout on hanging connection attempt", func(t *testing.T) { lis, err := net.Listen("tcp", "localhost:0") require.NoError(t, err) |