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