fix: add testcase with fractional with single entry#362
fix: add testcase with fractional with single entry#362leakonvalinka wants to merge 2 commits intoopen-feature:mainfrom
Conversation
Signed-off-by: Lea Konvalinka <lea.konvalinka@dynatrace.com>
There was a problem hiding this comment.
Code Review
This pull request adds a new test case for fractional flags with a single entry to ensure they always resolve to the specified variant. The changes involve adding flag definitions to JSON files and corresponding Gherkin scenarios. The review feedback suggests correcting inconsistent step wording, adding version tags for broader test coverage, and reordering scenarios for better logical grouping.
evaluator/gherkin/fractional.feature
Outdated
|
|
||
| @fractional @fractional-v2 | ||
| Scenario: Fractional operator with single entry always resolves to the only variant | ||
| Given a String-flag with key "fractional-single-entry-flag" and a default value "fallback" |
There was a problem hiding this comment.
Inconsistent step wording. This file uses fallback value (e.g., lines 12, 36, 54) instead of default value. Please update for consistency with the rest of the file to ensure the test harness correctly identifies the step.
Given a String-flag with key "fractional-single-entry-flag" and a fallback value "fallback"
There was a problem hiding this comment.
resolved in following commit. is there a reason why the testcases in evaluator/ use "fallback" and the ones in targeting.feature use "default"?
evaluator/gherkin/fractional.feature
Outdated
| | nine | clubs | | ||
| | two | spades | | ||
|
|
||
| @fractional @fractional-v2 |
There was a problem hiding this comment.
This scenario is only tagged with @fractional-v2. Consider adding @fractional-v1 as well, as the expected behavior for a single-entry fractional rule should be consistent across both bucketing implementations. Additionally, the placement of this scenario separates two related 'shared seed' scenarios (lines 53 and 81); moving it before line 53 or after line 102 would improve logical grouping.
| | jon@company.com | heads | | ||
| | jane@company.com | tails | | ||
|
|
||
| @fractional @fractional-v2 |
There was a problem hiding this comment.
In my understanding this is indeed just a fractional-v2 feature
Signed-off-by: Lea Konvalinka <lea.konvalinka@dynatrace.com>
This PR
Related Issues
part of open-feature/flagd#1924
Notes
the fractional operator still needs to be adjusted
Follow-up Tasks
How to test