-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Todd Baert <[email protected]>
- Loading branch information
Showing
1 changed file
with
23 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,51 +13,51 @@ Feature: flagd json evaluation | |
And a context containing a key "email", with value "[email protected]" | ||
Then the returned value should be <value> | ||
Examples: | ||
| key | value | | ||
| some-email-targeted-flag | hi | | ||
| some-other-email-targeted-flag | yes | | ||
| key | value | | ||
| "some-email-targeted-flag" | "hi" | | ||
| "some-other-email-targeted-flag" | "yes" | | ||
|
||
# custom operators | ||
Scenario Outline: Fractional operator | ||
When a string flag with key "fractional-flag" is evaluated with default value "fallback" | ||
And a context containing a nested property with outer key "user" and inner key "name", with value <name> | ||
Then the returned value should be <value> | ||
Examples: | ||
| name | value | | ||
| jack | clubs | | ||
| queen | diamonds | | ||
| ace | hearts | | ||
| joker | spades | | ||
| name | value | | ||
| "jack" | "clubs" | | ||
| "queen" | "diamonds" | | ||
| "ace" | "hearts" | | ||
| "joker" | "spades" | | ||
|
||
Scenario Outline: Substring operators | ||
When a string flag with key "starts-ends-flag" is evaluated with default value "fallback" | ||
And a context containing a key "id", with value <id> | ||
Then the returned value should be <value> | ||
Examples: | ||
| id | value | | ||
| abcdef | prefix | | ||
| uvwxyz | postfix | | ||
| abcxyz | prefix | | ||
| lmnopq | nomatch | | ||
| id | value | | ||
| "abcdef" | "prefix" | | ||
| "uvwxyz" | "postfix" | | ||
| "abcxyz" | "prefix" | | ||
| "lmnopq" | "none" | | ||
|
||
Scenario Outline: Semantic version operator numeric comparision | ||
When a string flag with key "equal-greater-lesser-version-flag" is evaluated with default value "fallback" | ||
And a context containing a key "version", with value <version> | ||
Then the returned value should be <value> | ||
Examples: | ||
| version | value | | ||
| 2.0.0 | equal | | ||
| 2.1.0 | greater | | ||
| 1.9.0 | lesser | | ||
| 2.0.0-alpha | lesser | | ||
| 2.0.0.0 | invalid | | ||
| version | value | | ||
| "2.0.0" | "equal" | | ||
| "2.1.0" | "greater" | | ||
| "1.9.0" | "lesser" | | ||
| "2.0.0-alpha" | "lesser" | | ||
| "2.0.0.0" | "none" | | ||
|
||
Scenario Outline: Semantic version operator semantic comparision | ||
When a string flag with key "major-minor-version-flag" is evaluated with default value "fallback" | ||
And a context containing a key "version", with value <version> | ||
Then the returned value should be <value> | ||
Examples: | ||
| version | value | | ||
| 3.0.1 | minor | | ||
| 3.1.0 | major | | ||
| 4.0.0 | none | | ||
| version | value | | ||
| "3.0.1" | "minor" | | ||
| "3.1.0" | "major" | | ||
| "4.0.0" | "none" | |