Skip to content

Conversation

@m1kola
Copy link
Member

@m1kola m1kola commented Oct 4, 2024

Description

There is a potential for nil pointer dereference in the test. This change adds condition to check for nil.

Example failures:

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

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]>
@m1kola m1kola requested a review from a team as a code owner October 4, 2024 09:44
@netlify
Copy link

netlify bot commented Oct 4, 2024

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 33c6260
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/66ffb918475eb80008ea0d30
😎 Deploy Preview https://deploy-preview-1346--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@m1kola m1kola changed the title Fix a flake in upgrade e2e ✨ Fix a flake in upgrade e2e Oct 4, 2024
@codecov
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.37%. Comparing base (2d4c000) to head (33c6260).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1346   +/-   ##
=======================================
  Coverage   76.37%   76.37%           
=======================================
  Files          41       41           
  Lines        2438     2438           
=======================================
  Hits         1862     1862           
  Misses        402      402           
  Partials      174      174           
Flag Coverage Δ
e2e 58.44% <ø> (ø)
unit 53.60% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clusterExtension.Status.Install.Bundle is not a pointer and it doesn't make much sense to check for it being empty: we can just check the value (Version) we care about after checking that clusterExtension.Status.Install is not nil.

@m1kola m1kola added this pull request to the merge queue Oct 4, 2024
Merged via the queue into operator-framework:main with commit 8466890 Oct 4, 2024
17 of 19 checks passed
@m1kola m1kola deleted the fix-upgrade-e2e-panic-flake branch October 4, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants