mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-07 03:48:17 +02:00
more time
This commit is contained in:
parent
1b033471a6
commit
7ea4b6fe6f
1 changed files with 3 additions and 6 deletions
|
@ -38,17 +38,14 @@ func TestLayeredConfig(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
|
||||
var dst atomic.Pointer[config.Config]
|
||||
dst.Store(layered.GetConfig())
|
||||
layered.OnConfigChange(ctx, func(ctx context.Context, c *config.Config) {
|
||||
dst.Store(c)
|
||||
})
|
||||
|
||||
underlying.SetConfig(ctx, &config.Config{Options: &config.Options{DeriveInternalDomainCert: proto.String("b.com")}})
|
||||
assert.Eventually(t, func() bool {
|
||||
cfg := dst.Load()
|
||||
if cfg == nil {
|
||||
return false
|
||||
}
|
||||
return cfg.Options.GetDeriveInternalDomain() == "b.com"
|
||||
}, time.Second, time.Millisecond)
|
||||
return dst.Load().Options.GetDeriveInternalDomain() == "b.com"
|
||||
}, 10*time.Second, time.Millisecond)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue