test fixes

This commit is contained in:
Alex Dadgar
2016-08-18 10:30:47 -07:00
parent 176a71690b
commit b082bdd52f
2 changed files with 10 additions and 0 deletions

View File

@@ -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

View File

@@ -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,
},
}
}