Skip to content

Commit 8466890

Browse files
authored
Fix a flake in upgrade e2e (#1346)
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]>
1 parent 2d4c000 commit 8466890

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/upgrade-e2e/post_upgrade_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func TestClusterExtensionAfterOLMUpgrade(t *testing.T) {
8686
assert.Equal(ct, metav1.ConditionTrue, cond.Status)
8787
assert.Equal(ct, ocv1alpha1.ReasonSuccess, cond.Reason)
8888
assert.Contains(ct, cond.Message, "Installed bundle")
89-
if assert.NotEmpty(ct, clusterExtension.Status.Install.Bundle) {
89+
if assert.NotNil(ct, clusterExtension.Status.Install) {
9090
assert.NotEmpty(ct, clusterExtension.Status.Install.Bundle.Version)
9191
}
9292
}, time.Minute, time.Second)

0 commit comments

Comments
 (0)