NewTestCluster use default audit backends (#26491)

This commit is contained in:
Peter Wilson 2024-04-18 13:12:04 +01:00 committed by GitHub
parent 4f28753cc4
commit 1d2dd323ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1414,13 +1414,17 @@ func NewTestCluster(t testing.T, base *CoreConfig, opts *TestClusterOptions) *Te
coreConfig := &CoreConfig{
LogicalBackends: make(map[string]logical.Factory),
CredentialBackends: make(map[string]logical.Factory),
AuditBackends: make(map[string]audit.Factory),
RedirectAddr: fmt.Sprintf("https://127.0.0.1:%d", listeners[0][0].Address.Port),
ClusterAddr: "https://127.0.0.1:0",
DisableMlock: true,
EnableUI: true,
EnableRaw: true,
BuiltinRegistry: corehelpers.NewMockBuiltinRegistry(),
AuditBackends: map[string]audit.Factory{
"file": audit.NewFileBackend,
"socket": audit.NewSocketBackend,
"syslog": audit.NewSyslogBackend,
},
RedirectAddr: fmt.Sprintf("https://127.0.0.1:%d", listeners[0][0].Address.Port),
ClusterAddr: "https://127.0.0.1:0",
DisableMlock: true,
EnableUI: true,
EnableRaw: true,
BuiltinRegistry: corehelpers.NewMockBuiltinRegistry(),
}
if base != nil {