Skip to content

Commit

Permalink
fix: leader election e2e test (#2655)
Browse files Browse the repository at this point in the history
Signed-off-by: Attila Mészáros <[email protected]>
  • Loading branch information
csviri authored Jan 6, 2025
1 parent 0710c6b commit 0251971
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,15 @@ private void deployOperatorsInOrder(String yamlFilePrefix) {
applyResources("k8s/" + yamlFilePrefix + "operator.yaml");
await().atMost(Duration.ofSeconds(POD_STARTUP_TIMEOUT)).untilAsserted(() -> {
var pod = client.pods().inNamespace(namespace).withName(OPERATOR_1_POD_NAME).get();
assertThat(pod.getStatus().getContainerStatuses()).isNotEmpty();
assertThat(pod.getStatus().getContainerStatuses().get(0).getReady()).isTrue();
});

log.info("Installing 2nd instance");
applyResources("k8s/" + yamlFilePrefix + "operator-instance-2.yaml");
await().atMost(Duration.ofSeconds(POD_STARTUP_TIMEOUT)).untilAsserted(() -> {
var pod = client.pods().inNamespace(namespace).withName(OPERATOR_2_POD_NAME).get();
assertThat(pod.getStatus().getContainerStatuses()).isNotEmpty();
assertThat(pod.getStatus().getContainerStatuses().get(0).getReady()).isTrue();
});
}
Expand Down

0 comments on commit 0251971

Please sign in to comment.