-
Notifications
You must be signed in to change notification settings - Fork 177
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
fix: selection algo filtering on max price fixed #3179
base: master
Are you sure you want to change the base?
fix: selection algo filtering on max price fixed #3179
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
server/selection_algorithm_test.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for adding tests 🙏
Co-authored-by: Victor Elias <victorgelias@gmail.com>
I updated for suggested change. Learned something new, did not know |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3179 +/- ##
===================================================
+ Coverage 33.72335% 33.72602% +0.00267%
===================================================
Files 141 141
Lines 37434 37434
===================================================
+ Hits 12624 12625 +1
+ Misses 24089 24088 -1
Partials 721 721
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
What does this pull request do? Explain your changes. (required)
Fixes behavior of gateway when no max price is set.
0
maxPrice will return to being no max price filter enabled.The addition of maxPricePerCapability included initializing a zero max price by default so the map is fully initialized. This broke the
filterByMaxPrice
function that checked for an unsetmaxPrice
ofnil
.Specific updates (required)
filterByMaxPrice
function inselection_algorithm.go
to check for 0 rather than checking for nilHow did you test each of these updates (required)
Added new test and ran all tests in selection_algorithm_test.go
Does this pull request close any open issues?
Checklist:
make
runs successfully./test.sh
passX selection_algorithm_test.go pass.