mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
api/testutil: Use fast fingerprint timeout in dev mode tests (#9285)
This commit is contained in:
@@ -76,7 +76,8 @@ type ServerConfig struct {
|
||||
|
||||
// ClientConfig is used to configure the client
|
||||
type ClientConfig struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Options map[string]string `json:"options,omitempty"`
|
||||
}
|
||||
|
||||
// VaultConfig is used to configure Vault
|
||||
@@ -174,6 +175,13 @@ func NewTestServer(t testing.T, cb ServerConfigCallback) *TestServer {
|
||||
cb(nomadConfig)
|
||||
}
|
||||
|
||||
if nomadConfig.DevMode {
|
||||
if nomadConfig.Client.Options == nil {
|
||||
nomadConfig.Client.Options = map[string]string{}
|
||||
}
|
||||
nomadConfig.Client.Options["test.tighten_network_timeouts"] = "true"
|
||||
}
|
||||
|
||||
configContent, err := json.Marshal(nomadConfig)
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user