Skip to content

Commit

Permalink
Get correct leader election holder ID in upgrade test (#1994)
Browse files Browse the repository at this point in the history
* Get correct leader election holder ID in upgrade test
  • Loading branch information
ciarams87 authored May 22, 2024
1 parent 206f136 commit 082e63e
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 strings.Contains(*lease.Spec.HolderIdentity, podName) {
return true, nil
}
}
Expand Down

0 comments on commit 082e63e

Please sign in to comment.