WithDefaultOverrides this will override the default test configuration with the provided values.
(overrides Config)
| 85 | |
| 86 | // WithDefaultOverrides this will override the default test configuration with the provided values. |
| 87 | func (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 | |
| 105 | type configLoadError struct { |
| 106 | Response string |
no outgoing calls