Skip to content

Commit

Permalink
Use slices to check array contains
Browse files Browse the repository at this point in the history
  • Loading branch information
domhanak committed Feb 8, 2024
1 parent 26e4d94 commit fefd7c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/e2e/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"os"
"os/exec"
"regexp"
"slices"
"strconv"
"strings"

Expand Down Expand Up @@ -111,8 +112,7 @@ func getHealthStatusInContainer(podName string, containerName string, ns string)
fmt.Printf("HealthCheck response: %q\n", stringOutput)
return nil, fmt.Errorf("failed to execute curl command against health endpoint in container %s:%v with output %s", containerName, err, output)
}
Expect(healthChecks).ShouldNot(ContainSubstring("\"status\": \"DOWN\""))
Expect(healthChecks).Should(ContainSubstring("\"status\": \"UP\""))
Expect(slices.Contains(healthChecks, "\"name\": \"alive\",\n \"status\": \"UP\"")).To(BeTrue())
return &h, nil
}
func verifyWorkflowIsInRunningStateInNamespace(workflowName string, ns string) bool {
Expand Down

0 comments on commit fefd7c3

Please sign in to comment.