MCPcopy
hub / github.com/caddyserver/caddy / WithDefaultOverrides

Method WithDefaultOverrides

caddytest/caddytest.go:87–103  ·  view source on GitHub ↗

WithDefaultOverrides this will override the default test configuration with the provided values.

(overrides Config)

Source from the content-addressed store, hash-verified

85
86// WithDefaultOverrides this will override the default test configuration with the provided values.
87func (tc *Tester) WithDefaultOverrides(overrides Config) *Tester {
88 if overrides.AdminPort != 0 {
89 tc.config.AdminPort = overrides.AdminPort
90 }
91 if len(overrides.Certificates) > 0 {
92 tc.config.Certificates = overrides.Certificates
93 }
94 if overrides.TestRequestTimeout != 0 {
95 tc.config.TestRequestTimeout = overrides.TestRequestTimeout
96 tc.Client.Timeout = overrides.TestRequestTimeout
97 }
98 if overrides.LoadRequestTimeout != 0 {
99 tc.config.LoadRequestTimeout = overrides.LoadRequestTimeout
100 }
101
102 return tc
103}
104
105type configLoadError struct {
106 Response string

Callers 2

testProxyProtocolMatrixFunction · 0.95

Calls

no outgoing calls

Tested by 2

testProxyProtocolMatrixFunction · 0.76