fix race test (#26500)

This commit is contained in:
Peter Wilson
2024-04-18 18:43:07 +01:00
committed by GitHub
parent fd9e113c82
commit 17c6cd1a2e

View File

@@ -168,7 +168,7 @@ func TestAuditEnableCommand_Run(t *testing.T) {
client, closer := testVaultServerAllBackends(t)
defer closer()
for name := range auditBackends {
for _, name := range []string{"file", "socket", "syslog"} {
ui, cmd := testAuditEnableCommand(t)
cmd.client = client
@@ -177,8 +177,7 @@ func TestAuditEnableCommand_Run(t *testing.T) {
case "file":
args = append(args, "file_path=discard")
case "socket":
args = append(args, "address=127.0.0.1:8888",
"skip_test=true")
args = append(args, "address=127.0.0.1:8888", "skip_test=true")
case "syslog":
if _, exists := os.LookupEnv("WSLENV"); exists {
t.Log("skipping syslog test on WSL")