Browse Source

Merge pull request #7843 from hashicorp/oss-sync/auditing-config

agent/config: Fix tests & include Audit struct as a pointer on Config
pull/7846/head
Kit Patella 5 years ago committed by GitHub
parent
commit
58ee349a83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      agent/config/builder_oss.go
  2. 2
      agent/config/config.go
  3. 6
      agent/config/runtime_test.go

2
agent/config/builder_oss.go

@ -38,7 +38,7 @@ var (
c.ACL.Tokens.ManagedServiceProvider = nil
},
"audit": func(c *Config) {
c.Audit = Audit{}
c.Audit = nil
},
}
)

2
agent/config/config.go

@ -320,7 +320,7 @@ type Config struct {
VersionPrerelease *string `json:"version_prerelease,omitempty" hcl:"version_prerelease" mapstructure:"version_prerelease"`
// Enterprise Only
Audit Audit `json:"audit,omitempty" hcl:"audit" mapstructure:"audit"`
Audit *Audit `json:"audit,omitempty" hcl:"audit" mapstructure:"audit"`
// Enterprise Only
NonVotingServer *bool `json:"non_voting_server,omitempty" hcl:"non_voting_server" mapstructure:"non_voting_server"`
// Enterprise Only

6
agent/config/runtime_test.go

@ -3943,6 +3943,9 @@ func TestFullConfig(t *testing.T) {
},
"advertise_addr": "17.99.29.16",
"advertise_addr_wan": "78.63.37.19",
"audit": {
"enabled": false
},
"autopilot": {
"cleanup_dead_servers": true,
"disable_upgrade_migration": true,
@ -4576,6 +4579,9 @@ func TestFullConfig(t *testing.T) {
}
advertise_addr = "17.99.29.16"
advertise_addr_wan = "78.63.37.19"
audit = {
enabled = false
}
autopilot = {
cleanup_dead_servers = true
disable_upgrade_migration = true

Loading…
Cancel
Save