Skip to content

Commit

Permalink
Correct test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
johscheuer committed Sep 25, 2023
1 parent 53bafba commit 65e8480
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions e2e/test_operator/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -753,25 +753,26 @@ var _ = Describe("Operator", Label("e2e", "pr"), func() {
BeforeEach(func() {
currentGeneration := fdbCluster.GetCluster().Generation
Expect(fdbCluster.SetProcessGroupPrefix(prefix)).NotTo(HaveOccurred())
Expect(fdbCluster.WaitForReconciliation(fixtures.MinimumGenerationOption(currentGeneration), fixtures.SoftReconcileOption(false)))
Expect(fdbCluster.WaitForReconciliation(fixtures.MinimumGenerationOption(currentGeneration+1), fixtures.SoftReconcileOption(false)))
})

It("should add the prefix to all instances", func() {
for _, processGroup := range fdbCluster.GetCluster().Status.ProcessGroups {
log.Println("DEBUG", processGroup.String())
Expect(string(processGroup.ProcessGroupID)).To(HavePrefix(prefix))
}
Eventually(func(g Gomega) bool {
for _, processGroup := range fdbCluster.GetCluster().Status.ProcessGroups {
g.Expect(string(processGroup.ProcessGroupID)).To(HavePrefix(prefix))
}

pods := fdbCluster.GetPods()
for _, pod := range pods.Items {
// Ignore any old Pods that are marked for removal.
if !pod.DeletionTimestamp.IsZero() {
continue
return true
}).WithTimeout(5 * time.Minute).WithPolling(5 * time.Second).Should(BeTrue())

Eventually(func(g Gomega) bool {
pods := fdbCluster.GetPods()
for _, pod := range pods.Items {
g.Expect(string(fixtures.GetProcessGroupID(pod))).To(HavePrefix(prefix))
}

log.Println("DEBUG", pod.GetLabels())
Expect(string(fixtures.GetProcessGroupID(pod))).To(HavePrefix(prefix))
}
return true
}).WithTimeout(5 * time.Minute).WithPolling(5 * time.Second).Should(BeTrue())
})
})

Expand Down

0 comments on commit 65e8480

Please sign in to comment.