|
| 1 | +@disabled @in-process @rpc |
| 2 | +Feature: Disabled flag evaluation |
| 3 | + |
| 4 | + # Test coverage for disabled flag behavior. A flag with state=DISABLED resolves |
| 5 | + # successfully with reason=DISABLED; the evaluator substitutes the caller-provided |
| 6 | + # default value and omits the variant. |
| 7 | + # Relates to: https://github.com/open-feature/flagd/issues/1965 |
| 8 | + |
| 9 | + Scenario Outline: Evaluating a disabled flag returns reason DISABLED and code default |
| 10 | + Given an option "cache" of type "CacheType" with value "disabled" |
| 11 | + And a stable flagd provider |
| 12 | + And a <type>-flag with key "<key>" and a default value "<default>" |
| 13 | + When the flag was evaluated with details |
| 14 | + Then the resolved details value should be "<default>" |
| 15 | + And the reason should be "DISABLED" |
| 16 | + |
| 17 | + Examples: |
| 18 | + | key | type | default | |
| 19 | + | disabled-boolean-flag | Boolean | false | |
| 20 | + | disabled-string-flag | String | bye | |
| 21 | + | disabled-integer-flag | Integer | 1 | |
| 22 | + | disabled-float-flag | Float | 0.1 | |
| 23 | + | disabled-object-flag | Object | {} | |
| 24 | + |
| 25 | + Scenario Outline: Flag disabled in one flag set, enabled in another |
| 26 | + Given an option "cache" of type "CacheType" with value "disabled" |
| 27 | + And an option "selector" of type "String" with value "<selector>" |
| 28 | + And a stable flagd provider |
| 29 | + And a Boolean-flag with key "cross-flagset-flag" and a default value "false" |
| 30 | + When the flag was evaluated with details |
| 31 | + Then the resolved details value should be "<resolved_value>" |
| 32 | + And the reason should be "<reason>" |
| 33 | + |
| 34 | + Examples: |
| 35 | + | selector | resolved_value | reason | |
| 36 | + | flags/allFlags.json | false | DISABLED | |
| 37 | + | rawflags/selector-flags.json | true | STATIC | |
0 commit comments