add in change missed from ent

This commit is contained in:
Drew Bailey 2020-03-25 10:53:38 -04:00
parent 97cc19276d
commit 218bfff6dd
No known key found for this signature in database
GPG key ID: FBA61B9FB7CCE1A7
2 changed files with 11 additions and 3 deletions

View file

@ -1010,6 +1010,12 @@ func (a *Agent) Reload(newConfig *Config) error {
return err
}
}
// Allow auditor to call reopen regardless of config changes
// This is primarily for enterprise audit logging to allow the underlying
// file to be reopened if necessary
if err := a.auditor.Reopen(); err != nil {
return err
}
fullUpdateTLSConfig := func() {
// Completely reload the agent's TLS configuration (moving from non-TLS to

View file

@ -657,7 +657,8 @@ func TestServer_Reload_TLS_Certificate(t *testing.T) {
}
agent := &Agent{
config: agentConfig,
auditor: &noOpAuditor{},
config: agentConfig,
}
newConfig := &Config{
@ -785,8 +786,9 @@ func TestServer_Reload_TLS_UpgradeToTLS(t *testing.T) {
}
agent := &Agent{
logger: logger,
config: agentConfig,
auditor: &noOpAuditor{},
logger: logger,
config: agentConfig,
}
newConfig := &Config{