Skip to content

Commit

Permalink
Fix a flake in upgrade e2e (#1346)
Browse files Browse the repository at this point in the history
There is a potential for nil pointer dereference in the test.
This change adds condition to check for nil.

Signed-off-by: Mikalai Radchuk <[email protected]>
  • Loading branch information
m1kola authored Oct 4, 2024
1 parent 2d4c000 commit 8466890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/upgrade-e2e/post_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TestClusterExtensionAfterOLMUpgrade(t *testing.T) {
assert.Equal(ct, metav1.ConditionTrue, cond.Status)
assert.Equal(ct, ocv1alpha1.ReasonSuccess, cond.Reason)
assert.Contains(ct, cond.Message, "Installed bundle")
if assert.NotEmpty(ct, clusterExtension.Status.Install.Bundle) {
if assert.NotNil(ct, clusterExtension.Status.Install) {
assert.NotEmpty(ct, clusterExtension.Status.Install.Bundle.Version)
}
}, time.Minute, time.Second)
Expand Down

0 comments on commit 8466890

Please sign in to comment.