Skip to content

Commit 5b07065

Browse files
chrfwowtoddbaertaepfli
authored
feat: Update test harness with metadata assertions #1467 (#289)
## This PR Adds gherkin test to verify that flag evaluations provide metadata ### Related Issues Part of #1467 ([https://github.com/open-feature/flagd/issues/1467](https://github.com/open-feature/flagd/issues/1467)) ### Follow-up Tasks Implement steps of the gherkin file in the repositories, and add test data according to the issue --------- Signed-off-by: christian.lutnik <[email protected]> Signed-off-by: Todd Baert <[email protected]> Co-authored-by: Todd Baert <[email protected]> Co-authored-by: Simon Schrottner <[email protected]>
1 parent 6c673d7 commit 5b07065

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@Metadata
2+
Feature: Metadata
3+
4+
Background:
5+
Given a stable provider
6+
7+
Scenario: Returns metadata
8+
Given a Boolean-flag with key "metadata-flag" and a default value "true"
9+
When the flag was evaluated with details
10+
Then the resolved metadata should contain
11+
| key | metadata_type | value |
12+
| string | String | 1.0.2 |
13+
| integer | Integer | 2 |
14+
| float | Float | 0.1 |
15+
| boolean | Boolean | true |
16+
17+
Scenario Outline: Returns no metadata
18+
Given a <flag_type>-flag with key "<key>" and a default value "<default_value>"
19+
When the flag was evaluated with details
20+
Then the resolved metadata is empty
21+
22+
Examples: Flags
23+
| key | flag_type | default_value |
24+
| boolean-flag | Boolean | true |
25+
| integer-flag | Integer | 23 |
26+
| float-flag | Float | 2.3 |
27+
| string-flag | String | value |

0 commit comments

Comments
 (0)