Skip to content

Commit

Permalink
test: Fix flake in ValidateEndpointsAreCorrect
Browse files Browse the repository at this point in the history
ValidateEndpointsAreCorrect ensures that all Docker containers have a
corresponding Cilium endpoints. The information necessary to match
containers with Cilium endpoints is however only available once the
endpoints are ready (have received labels, identity, and other
information). We therefore need to wait for all endpoints to be ready
before running ValidateEndpointsAreCorrect.

Signed-off-by: Paul Chaignon <paul@cilium.io>
  • Loading branch information
pchaigno authored and jrajahalme committed May 11, 2021
1 parent f7bd191 commit 9fa9672
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/runtime/assertionHelpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func ExpectCiliumNotRunning(vm *helpers.SSHMeta) {
// ExpectDockerContainersMatchCiliumEndpoints asserts that docker containers in
// Cilium network match with the endpoint list
func ExpectDockerContainersMatchCiliumEndpoints(vm *helpers.SSHMeta) {
ExpectWithOffset(1, vm.WaitEndpointsReady()).Should(BeTrue(), "Endpoints are not ready after timeout")
ExpectWithOffset(1, vm.ValidateEndpointsAreCorrect(helpers.CiliumDockerNetwork)).To(BeNil(),
"Docker containers mistmach with Cilium Endpoints")
}

0 comments on commit 9fa9672

Please sign in to comment.