|
| 1 | +@contextEnrichment |
| 2 | +Feature: Context Enrichment |
| 3 | + |
| 4 | + Background: |
| 5 | + And a stable flagd provider |
| 6 | + |
| 7 | + @in-process @rpc |
| 8 | + Scenario: Use enriched context |
| 9 | + Given a String-flag with key "flagd-context-aware" and a default value "not" |
| 10 | + When the flag was evaluated with details |
| 11 | + Then the resolved details value should be "INTERNAL" |
| 12 | + |
| 13 | + @grace @in-process |
| 14 | + Scenario: Use enriched context on connection error for IN-PROCESS |
| 15 | + Given a String-flag with key "flagd-context-aware" and a default value "not" |
| 16 | + And a stale event handler |
| 17 | + When the flag was evaluated with details |
| 18 | + Then the resolved details value should be "INTERNAL" |
| 19 | + When the connection is lost for 6s |
| 20 | + And a stale event was fired |
| 21 | + When the flag was evaluated with details |
| 22 | + Then the resolved details value should be "INTERNAL" |
| 23 | + |
| 24 | + @grace @rpc |
| 25 | + Scenario: Use enriched context on connection error for RPC |
| 26 | + Given a String-flag with key "flagd-context-aware" and a default value "not" |
| 27 | + And a stale event handler |
| 28 | + When the flag was evaluated with details |
| 29 | + Then the resolved details value should be "INTERNAL" |
| 30 | + When the connection is lost for 6s |
| 31 | + And a stale event was fired |
| 32 | + When the flag was evaluated with details |
| 33 | + Then the resolved details value should be "not" |
| 34 | + |
| 35 | + @rpc @caching |
| 36 | + Scenario: Use enriched context on RPC connection will not cache the value |
| 37 | + Given a String-flag with key "flagd-context-aware" and a default value "not" |
| 38 | + And a change event handler |
| 39 | + When the flag was modified |
| 40 | + And a change event was fired |
| 41 | + And the flag was evaluated with details |
| 42 | + Then the reason should be "TARGETING_MATCH" |
| 43 | + When the flag was evaluated with details |
| 44 | + Then the reason should be "TARGETING_MATCH" |
0 commit comments