mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
test fixes
This commit is contained in:
@@ -52,6 +52,7 @@ func makeAgent(t testing.TB, cb func(*Config)) (string, *Agent) {
|
||||
}
|
||||
conf.NodeName = fmt.Sprintf("Node %d", conf.Ports.RPC)
|
||||
conf.Consul = sconfig.DefaultConsulConfig()
|
||||
conf.Vault.Enabled = false
|
||||
|
||||
// Tighten the Serf timing
|
||||
config.SerfConfig.MemberlistConfig.SuspicionMult = 2
|
||||
|
||||
@@ -39,6 +39,7 @@ type TestServerConfig struct {
|
||||
Ports *PortsConfig `json:"ports,omitempty"`
|
||||
Server *ServerConfig `json:"server,omitempty"`
|
||||
Client *ClientConfig `json:"client,omitempty"`
|
||||
Vault *VaultConfig `json:"vault,omitempty"`
|
||||
DevMode bool `json:"-"`
|
||||
Stdout, Stderr io.Writer `json:"-"`
|
||||
}
|
||||
@@ -61,6 +62,11 @@ type ClientConfig struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
}
|
||||
|
||||
// VaultConfig is used to configure Vault
|
||||
type VaultConfig struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
}
|
||||
|
||||
// ServerConfigCallback is a function interface which can be
|
||||
// passed to NewTestServerConfig to modify the server config.
|
||||
type ServerConfigCallback func(c *TestServerConfig)
|
||||
@@ -86,6 +92,9 @@ func defaultServerConfig() *TestServerConfig {
|
||||
Client: &ClientConfig{
|
||||
Enabled: false,
|
||||
},
|
||||
Vault: &VaultConfig{
|
||||
Enabled: false,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user