Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RHICOMPL-574] Fix issues with versions containing 0 #740

Merged
merged 1 commit into from
Sep 3, 2020

Conversation

bastilian
Copy link
Member

There were issues with how the conditions got interpreted with &&.

With version numbers like 8.0 it would show just 0.
This fixes these issues and OS information is correctly shown.

@codecov-commenter
Copy link

codecov-commenter commented Sep 3, 2020

Codecov Report

Merging #740 into master will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #740      +/-   ##
==========================================
+ Coverage   74.46%   74.52%   +0.05%     
==========================================
  Files          58       58              
  Lines         885      887       +2     
  Branches      121      122       +1     
==========================================
+ Hits          659      661       +2     
  Misses        196      196              
  Partials       30       30              
Impacted Files Coverage Δ
src/store/Reducers/SystemStore.js 74.68% <100.00%> (+0.65%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f0f591c...48c00e8. Read the comment docs.

expect(result).toEqual(true);
});

it('return false for both versions being 0', () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

This should in theory not happen with a backend that has proper data and imported hosts correctly and we should not have a OS version 0.0, but just to be sure.

@vkrizan
Copy link
Collaborator

vkrizan commented Sep 3, 2020

LGTM

Copy link
Contributor

@akofink akofink left a comment

Choose a reason for hiding this comment

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

Works as expected! Thanks, @bastilian!

@bastilian bastilian merged commit e429dfd into RedHatInsights:master Sep 3, 2020
@bastilian bastilian deleted the 574-2 branch December 1, 2022 11:54
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.

4 participants