mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-12 16:47:41 +02:00
postgres: return an empty list of addresses on dns errors (#3637)
This commit is contained in:
parent
3fec00f2a8
commit
3b2cc6720a
2 changed files with 36 additions and 1 deletions
|
@ -184,3 +184,17 @@ func TestBackend(t *testing.T) {
|
|||
return nil
|
||||
}))
|
||||
}
|
||||
|
||||
func TestLookup(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx, clearTimeout := context.WithTimeout(context.Background(), time.Second*10)
|
||||
t.Cleanup(clearTimeout)
|
||||
|
||||
cfg, err := ParseConfig("host=localhost")
|
||||
assert.NoError(t, err)
|
||||
|
||||
addrs, err := cfg.ConnConfig.LookupFunc(ctx, "test.unknown")
|
||||
assert.NoError(t, err)
|
||||
assert.Empty(t, addrs)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue