Skip to content

feat: add context-sensitive test with connection err #227

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

Merged
merged 3 commits into from
Feb 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions gherkin/targeting.feature
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,19 @@ Feature: Targeting rules
| non-string-variant-targeting-flag | 2 |
| empty-targeting-flag | 1 |

@flagdcontext
Scenario: Use Flagd provided context
@contextEnrichment
Copy link
Member Author

Choose a reason for hiding this comment

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

@aepfli I thought this was a better name and more consistent with the wording we use in code and options.

Scenario: Use enriched context
Given a String-flag with key "flagd-context-aware" and a default value "not"
When the flag was evaluated with details
Then the resolved details value should be "INTERNAL"

@contextEnrichment
Scenario: Use enriched context on connection error
Given a String-flag with key "flagd-context-aware" and a default value "not"
And a stale event handler
When the flag was evaluated with details
Then the resolved details value should be "INTERNAL"
When the connection is lost for 6s
And a stale event was fired
When the flag was evaluated with details
Then the resolved details value should be "INTERNAL"