testutil: Allow enabling ACLs

This commit is contained in:
Armon Dadgar
2017-08-24 17:02:52 -07:00
parent e840bb1019
commit 49f9f0e26b

View File

@@ -42,6 +42,7 @@ type TestServerConfig struct {
Server *ServerConfig `json:"server,omitempty"`
Client *ClientConfig `json:"client,omitempty"`
Vault *VaultConfig `json:"vault,omitempty"`
ACL *ACLConfig `json:"acl,omitempty"`
DevMode bool `json:"-"`
Stdout, Stderr io.Writer `json:"-"`
}
@@ -76,6 +77,11 @@ type VaultConfig struct {
Enabled bool `json:"enabled"`
}
// ACLConfig is used to configure ACLs
type ACLConfig 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)
@@ -110,6 +116,9 @@ func defaultServerConfig() *TestServerConfig {
Vault: &VaultConfig{
Enabled: false,
},
ACL: &ACLConfig{
Enabled: false,
},
}
}