mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
test: Use a template to prevent migrations from running for every test (#2462)
* test: Use a template to prevent migrations from running for every test * Create a single makefile target * Fix built-in race * Extend timeout of built-in PostgreSQL fetch
This commit is contained in:
@ -83,9 +83,9 @@ func TestServer(t *testing.T) {
|
||||
errC <- root.ExecuteContext(ctx)
|
||||
}()
|
||||
require.Eventually(t, func() bool {
|
||||
_, err := cfg.URL().Read()
|
||||
return err == nil
|
||||
}, time.Minute, 25*time.Millisecond)
|
||||
accessURLRaw, err := cfg.URL().Read()
|
||||
return accessURLRaw != "" && err == nil
|
||||
}, 3*time.Minute, 250*time.Millisecond)
|
||||
cancelFunc()
|
||||
require.ErrorIs(t, <-errC, context.Canceled)
|
||||
})
|
||||
|
Reference in New Issue
Block a user