This commit is contained in:
a 2024-06-18 21:18:38 -05:00
parent 926fb82f6b
commit edf4168c8e
No known key found for this signature in database
GPG key ID: 374BC539FE795AF0
2 changed files with 2 additions and 2 deletions

View file

@ -201,7 +201,7 @@ func (tc *Tester) startServer() error {
// start inprocess caddy server // start inprocess caddy server
go func() { go func() {
caddycmd.MainForTesting("caddy", "run", "--config", tc.configFileName, "--adapter", "caddyfile") caddycmd.MainForTesting("run", "--config", tc.configFileName, "--adapter", "caddyfile")
}() }()
// wait for caddy admin api to start. it should happen quickly. // wait for caddy admin api to start. it should happen quickly.
for retries := 10; retries > 0 && isCaddyAdminRunning() != nil; retries-- { for retries := 10; retries > 0 && isCaddyAdminRunning() != nil; retries-- {

View file

@ -94,7 +94,7 @@ func MainForTesting(args ...string) error {
Version: rootCmd.Version, Version: rootCmd.Version,
} }
tmpRootCmp.SetArgs(args) tmpRootCmp.SetArgs(args)
if err := rootCmd.Execute(); err != nil { if err := tmpRootCmp.Execute(); err != nil {
return err return err
} }
return nil return nil