Skip to content
Snippets Groups Projects
Unverified Commit 7d14aead authored by Sami Hiltunen's avatar Sami Hiltunen Committed by Stan Hu
Browse files

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.
parent db57a780
No related merge requests found
......@@ -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)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment