From ff27af0df67c9da9049aff966ed7b4519b17a020 Mon Sep 17 00:00:00 2001 From: "christian.lutnik" Date: Mon, 13 Jan 2025 13:21:46 +0100 Subject: [PATCH 1/4] feat: Update test harness (add assertions) #1467 Signed-off-by: christian.lutnik --- specification/assets/gherkin/metadata.feature | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 specification/assets/gherkin/metadata.feature diff --git a/specification/assets/gherkin/metadata.feature b/specification/assets/gherkin/metadata.feature new file mode 100644 index 00000000..c7a13ea8 --- /dev/null +++ b/specification/assets/gherkin/metadata.feature @@ -0,0 +1,25 @@ +@Metadata +Feature: Metadata + + Background: + Given a provider is registered + + Scenario: Returns metadata + Given a Boolean-flag with key "metadata-flag" and a default value "true" + When the flag was evaluated with details + Then the resolved metadata value "string" with type "String" should be "1.0.2" + And the resolved metadata value "integer" with type "Integer" should be "2" + And the resolved metadata value "double" with type "Double" should be "0.1" + And the resolved metadata value "boolean" with type "Boolean" should be "true" + + Scenario Outline: Returns no metadata + Given a -flag with key "" and a default value "" + When the flag was evaluated with details + Then the resolved metadata is empty + + Examples: Flags + | key | type | default_value | + | boolean-flag | Boolean | true | + | integer-flag | Integer | 23 | + | float-flag | Float | 2.3 | + | string-flag | String | value | From 148da8ee5531145f3949d289292fb04ac9b79bef Mon Sep 17 00:00:00 2001 From: "christian.lutnik" Date: Tue, 14 Jan 2025 11:22:35 +0100 Subject: [PATCH 2/4] fixup! feat: Update test harness (add assertions) #1467 Signed-off-by: christian.lutnik --- specification/assets/gherkin/metadata.feature | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/specification/assets/gherkin/metadata.feature b/specification/assets/gherkin/metadata.feature index c7a13ea8..ad27d179 100644 --- a/specification/assets/gherkin/metadata.feature +++ b/specification/assets/gherkin/metadata.feature @@ -7,10 +7,12 @@ Feature: Metadata Scenario: Returns metadata Given a Boolean-flag with key "metadata-flag" and a default value "true" When the flag was evaluated with details - Then the resolved metadata value "string" with type "String" should be "1.0.2" - And the resolved metadata value "integer" with type "Integer" should be "2" - And the resolved metadata value "double" with type "Double" should be "0.1" - And the resolved metadata value "boolean" with type "Boolean" should be "true" + Then the resolved metadata should contain + | key | metadata_type | value | + | string | String | 1.0.2 | + | integer | Integer | 2 | + | double | Double | 0.1 | + | boolean | Boolean | true | Scenario Outline: Returns no metadata Given a -flag with key "" and a default value "" From 30fb25ccb73ea5aad7638730c1307a15088712c5 Mon Sep 17 00:00:00 2001 From: "christian.lutnik" Date: Wed, 15 Jan 2025 10:48:14 +0100 Subject: [PATCH 3/4] fixup! fixup! feat: Update test harness (add assertions) #1467 Signed-off-by: christian.lutnik --- specification/assets/gherkin/metadata.feature | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/specification/assets/gherkin/metadata.feature b/specification/assets/gherkin/metadata.feature index ad27d179..b57215d2 100644 --- a/specification/assets/gherkin/metadata.feature +++ b/specification/assets/gherkin/metadata.feature @@ -11,17 +11,17 @@ Feature: Metadata | key | metadata_type | value | | string | String | 1.0.2 | | integer | Integer | 2 | - | double | Double | 0.1 | + | float | Float | 0.1 | | boolean | Boolean | true | Scenario Outline: Returns no metadata - Given a -flag with key "" and a default value "" + Given a -flag with key "" and a default value "" When the flag was evaluated with details Then the resolved metadata is empty Examples: Flags - | key | type | default_value | - | boolean-flag | Boolean | true | - | integer-flag | Integer | 23 | - | float-flag | Float | 2.3 | - | string-flag | String | value | + | key | flag_type | default_value | + | boolean-flag | Boolean | true | + | integer-flag | Integer | 23 | + | float-flag | Float | 2.3 | + | string-flag | String | value | From 1f1a7197212cd85341fc459c52d4d2b26a97488b Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Wed, 15 Jan 2025 11:05:48 -0500 Subject: [PATCH 4/4] Update specification/assets/gherkin/metadata.feature Co-authored-by: Simon Schrottner Signed-off-by: Todd Baert --- specification/assets/gherkin/metadata.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/assets/gherkin/metadata.feature b/specification/assets/gherkin/metadata.feature index b57215d2..d7799aaf 100644 --- a/specification/assets/gherkin/metadata.feature +++ b/specification/assets/gherkin/metadata.feature @@ -2,7 +2,7 @@ Feature: Metadata Background: - Given a provider is registered + Given a stable provider Scenario: Returns metadata Given a Boolean-flag with key "metadata-flag" and a default value "true"