Skip to content

Commit 84167f3

Browse files
authored
Fix nil pointer dereference in upgrade E2E (#1051)
Signed-off-by: Mikalai Radchuk <[email protected]>
1 parent a01ff5b commit 84167f3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/upgrade-e2e/post_upgrade_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ 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, "Instantiated bundle")
89-
assert.NotEmpty(ct, clusterExtension.Status.InstalledBundle)
90-
assert.NotEmpty(ct, clusterExtension.Status.InstalledBundle.Version)
89+
if assert.NotEmpty(ct, clusterExtension.Status.InstalledBundle) {
90+
assert.NotEmpty(ct, clusterExtension.Status.InstalledBundle.Version)
91+
}
9192
}, time.Minute, time.Second)
9293

9394
previousVersion := clusterExtension.Status.InstalledBundle.Version

0 commit comments

Comments
 (0)