mirror of https://github.com/status-im/consul.git
Merge pull request #7843 from hashicorp/oss-sync/auditing-config
agent/config: Fix tests & include Audit struct as a pointer on Config
This commit is contained in:
commit
58ee349a83
|
@ -38,7 +38,7 @@ var (
|
||||||
c.ACL.Tokens.ManagedServiceProvider = nil
|
c.ACL.Tokens.ManagedServiceProvider = nil
|
||||||
},
|
},
|
||||||
"audit": func(c *Config) {
|
"audit": func(c *Config) {
|
||||||
c.Audit = Audit{}
|
c.Audit = nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -320,7 +320,7 @@ type Config struct {
|
||||||
VersionPrerelease *string `json:"version_prerelease,omitempty" hcl:"version_prerelease" mapstructure:"version_prerelease"`
|
VersionPrerelease *string `json:"version_prerelease,omitempty" hcl:"version_prerelease" mapstructure:"version_prerelease"`
|
||||||
|
|
||||||
// Enterprise Only
|
// Enterprise Only
|
||||||
Audit Audit `json:"audit,omitempty" hcl:"audit" mapstructure:"audit"`
|
Audit *Audit `json:"audit,omitempty" hcl:"audit" mapstructure:"audit"`
|
||||||
// Enterprise Only
|
// Enterprise Only
|
||||||
NonVotingServer *bool `json:"non_voting_server,omitempty" hcl:"non_voting_server" mapstructure:"non_voting_server"`
|
NonVotingServer *bool `json:"non_voting_server,omitempty" hcl:"non_voting_server" mapstructure:"non_voting_server"`
|
||||||
// Enterprise Only
|
// Enterprise Only
|
||||||
|
|
|
@ -3943,6 +3943,9 @@ func TestFullConfig(t *testing.T) {
|
||||||
},
|
},
|
||||||
"advertise_addr": "17.99.29.16",
|
"advertise_addr": "17.99.29.16",
|
||||||
"advertise_addr_wan": "78.63.37.19",
|
"advertise_addr_wan": "78.63.37.19",
|
||||||
|
"audit": {
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
"autopilot": {
|
"autopilot": {
|
||||||
"cleanup_dead_servers": true,
|
"cleanup_dead_servers": true,
|
||||||
"disable_upgrade_migration": true,
|
"disable_upgrade_migration": true,
|
||||||
|
@ -4576,6 +4579,9 @@ func TestFullConfig(t *testing.T) {
|
||||||
}
|
}
|
||||||
advertise_addr = "17.99.29.16"
|
advertise_addr = "17.99.29.16"
|
||||||
advertise_addr_wan = "78.63.37.19"
|
advertise_addr_wan = "78.63.37.19"
|
||||||
|
audit = {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
autopilot = {
|
autopilot = {
|
||||||
cleanup_dead_servers = true
|
cleanup_dead_servers = true
|
||||||
disable_upgrade_migration = true
|
disable_upgrade_migration = true
|
||||||
|
|
Loading…
Reference in New Issue