-
Notifications
You must be signed in to change notification settings - Fork 12
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: Simon Schrottner <simon.schrottner@dynatrace.com>
- Loading branch information
Showing
6 changed files
with
131 additions
and
19 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
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
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
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
33 changes: 33 additions & 0 deletions
33
providers/openfeature-provider-flagd/tests/e2e/rpc_cache.feature
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Feature: Flag evaluation with Caching | ||
|
||
# This test suite contains scenarios to test the flag evaluation API. | ||
|
||
Background: | ||
Given a provider is registered with caching | ||
|
||
Scenario: Resolves boolean details with caching | ||
When a boolean flag with key "boolean-flag" is evaluated with details and default value "false" | ||
Then the resolved boolean details value should be "true", the variant should be "on", and the reason should be "STATIC" | ||
Then the resolved boolean details value should be "true", the variant should be "on", and the reason should be "CACHED" | ||
|
||
Scenario: Resolves string details | ||
When a string flag with key "string-flag" is evaluated with details and default value "bye" | ||
Then the resolved string details value should be "hi", the variant should be "greeting", and the reason should be "STATIC" | ||
Then the resolved string details value should be "hi", the variant should be "greeting", and the reason should be "CACHED" | ||
|
||
Scenario: Resolves integer details | ||
When an integer flag with key "integer-flag" is evaluated with details and default value 1 | ||
Then the resolved integer details value should be 10, the variant should be "ten", and the reason should be "STATIC" | ||
Then the resolved integer details value should be 10, the variant should be "ten", and the reason should be "CACHED" | ||
|
||
Scenario: Resolves float details | ||
When a float flag with key "float-flag" is evaluated with details and default value 0.1 | ||
Then the resolved float details value should be 0.5, the variant should be "half", and the reason should be "STATIC" | ||
Then the resolved float details value should be 0.5, the variant should be "half", and the reason should be "CACHED" | ||
|
||
Scenario: Resolves object details | ||
When an object flag with key "object-flag" is evaluated with details and a null default value | ||
Then the resolved object details value should be contain fields "showImages", "title", and "imagesPerPage", with values "true", "Check out these pics!" and 100, respectively | ||
And the variant should be "template", and the reason should be "STATIC" | ||
Then the resolved object details value should be contain fields "showImages", "title", and "imagesPerPage", with values "true", "Check out these pics!" and 100, respectively | ||
And the variant should be "template", and the reason should be "CACHED" |
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