Skip to content

Commit

Permalink
test/k8sT: add assertion helpers for hubble-cli and hubble-relay
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
  • Loading branch information
rolinh authored and tklauser committed May 20, 2020
1 parent 3c156a3 commit 610b91c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/k8sT/assertionHelpers.go
Expand Up @@ -56,6 +56,22 @@ func ExpectCiliumOperatorReady(vm *helpers.Kubectl) {
ExpectWithOffset(1, err).Should(BeNil(), "Cilium operator was not able to get into ready state")
}

// ExpectHubbleCLIReady is a wrapper around helpers/WaitForPods. It asserts
// that the error returned by that function is nil.
func ExpectHubbleCLIReady(vm *helpers.Kubectl, ns string) {
By("Waiting for hubble-cli to be ready")
err := vm.WaitforPods(ns, "-l k8s-app=hubble-cli", longTimeout)
ExpectWithOffset(1, err).Should(BeNil(), "hubble-cli was not able to get into ready state")
}

// ExpectHubbleRelayReady is a wrapper around helpers/WaitForPods. It asserts
// that the error returned by that function is nil.
func ExpectHubbleRelayReady(vm *helpers.Kubectl, ns string) {
By("Waiting for hubble-relay to be ready")
err := vm.WaitforPods(ns, "-l k8s-app=hubble-relay", longTimeout)
ExpectWithOffset(1, err).Should(BeNil(), "hubble-relay was not able to get into ready state")
}

// ExpectAllPodsTerminated is a wrapper around helpers/WaitCleanAllTerminatingPods.
// It asserts that the error returned by that function is nil.
func ExpectAllPodsTerminated(vm *helpers.Kubectl) {
Expand Down

0 comments on commit 610b91c

Please sign in to comment.