Skip to content

Commit

Permalink
Get correct leader election holder ID in upgrade test
Browse files Browse the repository at this point in the history
  • Loading branch information
ciarams87 committed May 22, 2024
1 parent 206f136 commit 9503bf3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/suite/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,12 @@ var _ = Describe("Upgrade testing", Label("nfr", "upgrade"), func() {
500*time.Millisecond,
true, /* poll immediately */
func(_ context.Context) (bool, error) {
defer GinkgoRecover()
Expect(k8sClient.Get(leaseCtx, key, &lease)).To(Succeed())

if lease.Spec.HolderIdentity != nil {
for _, podName := range podNames {
if podName == *lease.Spec.HolderIdentity {
if podName == strings.Split(*lease.Spec.HolderIdentity, "_")[0] {
return true, nil
}
}
Expand Down

0 comments on commit 9503bf3

Please sign in to comment.