mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-31 04:05:46 -04:00
noot
This commit is contained in:
parent
b491fc5d6c
commit
41a4320fd3
@ -93,7 +93,6 @@ func (tc *Tester) CleanupCaddy() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("couldn't stop caddytest server: %w", err)
|
return fmt.Errorf("couldn't stop caddytest server: %w", err)
|
||||||
}
|
}
|
||||||
time.Sleep(200 * time.Millisecond)
|
|
||||||
for retries := 0; retries < 10; retries++ {
|
for retries := 0; retries < 10; retries++ {
|
||||||
if isCaddyAdminRunning() != nil {
|
if isCaddyAdminRunning() != nil {
|
||||||
return nil
|
return nil
|
||||||
@ -206,8 +205,8 @@ func (tc *Tester) startServer() error {
|
|||||||
caddycmd.Main()
|
caddycmd.Main()
|
||||||
}()
|
}()
|
||||||
// wait for caddy admin api to start. it should happen quickly.
|
// wait for caddy admin api to start. it should happen quickly.
|
||||||
for retries := 3; retries > 0 && isCaddyAdminRunning() != nil; retries-- {
|
for retries := 10; retries > 0 && isCaddyAdminRunning() != nil; retries-- {
|
||||||
time.Sleep(1 * time.Second)
|
time.Sleep(100 * time.Millisecond)
|
||||||
}
|
}
|
||||||
|
|
||||||
// one more time to return the error
|
// one more time to return the error
|
||||||
|
@ -24,8 +24,7 @@ func AssertLoadError(t *testing.T, rawConfig string, configType string, expected
|
|||||||
if !strings.Contains(err.Error(), expectedError) {
|
if !strings.Contains(err.Error(), expectedError) {
|
||||||
t.Errorf("expected error \"%s\" but got \"%s\"", expectedError, err.Error())
|
t.Errorf("expected error \"%s\" but got \"%s\"", expectedError, err.Error())
|
||||||
}
|
}
|
||||||
err = tc.CleanupCaddy()
|
tc.CleanupCaddy()
|
||||||
require.NoError(t, err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// CompareAdapt adapts a config and then compares it against an expected result
|
// CompareAdapt adapts a config and then compares it against an expected result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user