-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add new flagd-evaluator e2e suite (#898)
Uses test suite defined [here](https://github.com/open-feature/flagd-testbed/blob/main/gherkin/flagd-json-evaluator.feature) to validate json evaluator behavior end-to-end, by using the test suite added [here](open-feature/go-sdk-contrib#328). --------- Signed-off-by: Todd Baert <[email protected]>
- Loading branch information
Showing
10 changed files
with
67 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "test-harness"] | ||
path = test-harness | ||
url = https://github.com/open-feature/test-harness.git | ||
[submodule "spec"] | ||
path = spec | ||
url = https://github.com/open-feature/spec.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package integration_test | ||
|
||
import ( | ||
"flag" | ||
"testing" | ||
|
||
"github.com/cucumber/godog" | ||
flagd "github.com/open-feature/go-sdk-contrib/providers/flagd/pkg" | ||
"github.com/open-feature/go-sdk-contrib/tests/flagd/pkg/integration" | ||
) | ||
|
||
func TestJsonEvaluator(t *testing.T) { | ||
if testing.Short() { | ||
t.Skip() | ||
} | ||
|
||
flag.Parse() | ||
|
||
var providerOptions []flagd.ProviderOption | ||
name := "flagd-json-evaluator.feature" | ||
|
||
testSuite := godog.TestSuite{ | ||
Name: name, | ||
ScenarioInitializer: integration.InitializeFlagdJsonScenario(providerOptions...), | ||
Options: &godog.Options{ | ||
Format: "pretty", | ||
Paths: []string{"../../../test-harness/gherkin/flagd-json-evaluator.feature"}, | ||
TestingT: t, // Testing instance that will run subtests. | ||
Strict: true, | ||
}, | ||
} | ||
|
||
if testSuite.Run() != 0 { | ||
t.Fatal("non-zero status returned, failed to run evaluation tests") | ||
} | ||
} |
Submodule test-harness
updated
from 48c56d to 6493d0