From 6dabc8bcadcbef84c2c02ed4a8aa067e1e4949fd Mon Sep 17 00:00:00 2001 From: Michael Beemer Date: Fri, 15 Dec 2023 15:14:04 -0500 Subject: [PATCH 1/2] fixed typos Signed-off-by: Michael Beemer --- gherkin/flagd-json-evaluator.feature | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gherkin/flagd-json-evaluator.feature b/gherkin/flagd-json-evaluator.feature index 01e1c65..56c30ee 100644 --- a/gherkin/flagd-json-evaluator.feature +++ b/gherkin/flagd-json-evaluator.feature @@ -2,7 +2,7 @@ Feature: flagd json evaluation # This test suite contains scenarios to test the json-evaluation of flagd and flag-in-process providers. # It's associated with the flags configured in flags/changing-flag.json, flags/zero-flags.json, flags/custom-ops.json and evaluator-refs.json. - # It should be used in conjunection with the suites supplied by the OpenFeature specification. + # It should be used in conjunction with the suites supplied by the OpenFeature specification. Background: Given a flagd provider is set @@ -42,7 +42,7 @@ Feature: flagd json evaluation | "lmnopq" | "none" | | 3 | "none" | - Scenario Outline: Semantic version operator numeric comparision + Scenario Outline: Semantic version operator numeric comparison When a string flag with key "equal-greater-lesser-version-flag" is evaluated with default value "fallback" And a context containing a key "version", with value Then the returned value should be @@ -54,7 +54,7 @@ Feature: flagd json evaluation | "2.0.0-alpha" | "lesser" | | "2.0.0.0" | "none" | - Scenario Outline: Semantic version operator semantic comparision + Scenario Outline: Semantic version operator semantic comparison When a string flag with key "major-minor-version-flag" is evaluated with default value "fallback" And a context containing a key "version", with value Then the returned value should be From 0f92d90019251abdf8b9ebb8efb87bb388a41f79 Mon Sep 17 00:00:00 2001 From: Michael Beemer Date: Fri, 15 Dec 2023 15:14:33 -0500 Subject: [PATCH 2/2] add empty targeting rule test Signed-off-by: Michael Beemer --- flags/edge-case-flags.json | 9 +++++++++ gherkin/flagd-json-evaluator.feature | 1 + 2 files changed, 10 insertions(+) diff --git a/flags/edge-case-flags.json b/flags/edge-case-flags.json index 771e750..aa16cb0 100644 --- a/flags/edge-case-flags.json +++ b/flags/edge-case-flags.json @@ -43,6 +43,15 @@ "targeting": { "if": [true, true, false] } + }, + "empty-targeting-flag": { + "state": "ENABLED", + "variants": { + "false": 1, + "true": 2 + }, + "defaultVariant": "false", + "targeting": {} } } } diff --git a/gherkin/flagd-json-evaluator.feature b/gherkin/flagd-json-evaluator.feature index 56c30ee..6e737ce 100644 --- a/gherkin/flagd-json-evaluator.feature +++ b/gherkin/flagd-json-evaluator.feature @@ -82,3 +82,4 @@ Feature: flagd json evaluation | "error-targeting-flag" | 3 | | "missing-variant-targeting-flag" | 3 | | "non-string-variant-targeting-flag" | 2 | + | "empty-targeting-flag" | 1 |