diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2023-10-23 17:52:09 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2023-10-23 17:52:09 +0300 |
commit | 748cec83e34717a475f79149e06f8214065f9b4f (patch) | |
tree | 0d8cb083c5dd55ae7b1fd53eeb70128ae51b8d38 | |
parent | 07a8c29c95a3bdaa5b091bbcdc46e2ba507301d9 (diff) |
Remove name resolving error test
We have a test asserting a specific error is returned when attempting
to resolve a non-existent name. The 'not-existing.com' address used
in the test has since been registered and no longer results in a
resolving error. Remove the test to have the pipeline pass. We're
probably fine even if we don't test for this specific case.
-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) |