-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathcontextEnrichment.feature
More file actions
50 lines (45 loc) · 1.94 KB
/
contextEnrichment.feature
File metadata and controls
50 lines (45 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@contextEnrichment
Feature: Context Enrichment
Background:
Given a stable flagd provider
@in-process @rpc
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"
@grace @in-process
Scenario: Use enriched context on connection error for IN-PROCESS
Given a String-flag with key "flagd-context-aware" and a default value "not"
And a stale event handler
And a ready 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"
When a ready event was fired
@grace @rpc
Scenario: Use enriched context on connection error for RPC
Given a String-flag with key "flagd-context-aware" and a default value "not"
And a stale event handler
And a ready 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 "not"
When a ready event was fired
@rpc @caching
Scenario: Use enriched context on RPC connection will not cache the value
Given a String-flag with key "flagd-context-aware" and a default value "not"
And a change event handler
And a ready event handler
When the flag was modified
And a change event was fired
And the flag was evaluated with details
Then the reason should be "TARGETING_MATCH"
# ensure that we do not cache a "TARGETING_MATCH", we should only cache evaluation with a "STATIC" reason
When the flag was evaluated with details
Then the reason should be "TARGETING_MATCH"