-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdisabled.feature
More file actions
37 lines (32 loc) · 1.72 KB
/
disabled.feature
File metadata and controls
37 lines (32 loc) · 1.72 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
@disabled @in-process @rpc
Feature: Disabled flag evaluation
# Test coverage for disabled flag behavior. A flag with state=DISABLED resolves
# successfully with reason=DISABLED; the evaluator substitutes the caller-provided
# default value and omits the variant.
# Relates to: https://github.com/open-feature/flagd/issues/1965
Scenario Outline: Evaluating a disabled flag returns reason DISABLED and code default
Given an option "cache" of type "CacheType" with value "disabled"
And a stable flagd provider
And a <type>-flag with key "<key>" and a default value "<default>"
When the flag was evaluated with details
Then the resolved details value should be "<default>"
And the reason should be "DISABLED"
Examples:
| key | type | default |
| disabled-boolean-flag | Boolean | false |
| disabled-string-flag | String | bye |
| disabled-integer-flag | Integer | 1 |
| disabled-float-flag | Float | 0.1 |
| disabled-object-flag | Object | {} |
Scenario Outline: Flag disabled in one flag set, enabled in another
Given an option "cache" of type "CacheType" with value "disabled"
And an option "selector" of type "String" with value "<selector>"
And a stable flagd provider
And a Boolean-flag with key "cross-flagset-flag" and a default value "false"
When the flag was evaluated with details
Then the resolved details value should be "<resolved_value>"
And the reason should be "<reason>"
Examples:
| selector | resolved_value | reason |
| flags/allFlags.json | false | DISABLED |
| rawflags/selector-flags.json | true | STATIC |