From 15f8e59c0e878c1ceb18e3ee103df8b6025b52e3 Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Fri, 3 Jan 2025 20:25:30 +0100 Subject: [PATCH] test(flagd): replace buildsteps with proper annotations. (#1116) Signed-off-by: Simon Schrottner --- providers/flagd/pom.xml | 94 ------------------- .../flagd/e2e/RunConfigCucumberTest.java | 4 +- .../e2e/RunFlagdInProcessCucumberTest.java | 8 +- .../RunFlagdInProcessEnvoyCucumberTest.java | 8 +- ...unFlagdInProcessReconnectCucumberTest.java | 4 +- .../e2e/RunFlagdInProcessSSLCucumberTest.java | 2 +- .../flagd/e2e/RunFlagdRpcCucumberTest.java | 10 +- .../e2e/RunFlagdRpcReconnectCucumberTest.java | 4 +- .../flagd/e2e/RunFlagdRpcSSLCucumberTest.java | 4 +- .../src/test/resources/features/.gitignore | 1 - .../src/test/resources/features/.gitkeep | 0 11 files changed, 22 insertions(+), 117 deletions(-) delete mode 100644 providers/flagd/src/test/resources/features/.gitignore delete mode 100644 providers/flagd/src/test/resources/features/.gitkeep diff --git a/providers/flagd/pom.xml b/providers/flagd/pom.xml index 33cd9327e..b15462a55 100644 --- a/providers/flagd/pom.xml +++ b/providers/flagd/pom.xml @@ -299,100 +299,6 @@ - - copy-gherkin-evaluation.feature - validate - - exec - - - - - cp - - spec/specification/assets/gherkin/evaluation.feature - src/test/resources/features/ - - - - - copy-gherkin-flagd-json-evaluator.feature - validate - - exec - - - - - cp - - test-harness/gherkin/flagd-json-evaluator.feature - src/test/resources/features/ - - - - - copy-gherkin-flagd.feature - validate - - exec - - - - - cp - - test-harness/gherkin/flagd.feature - src/test/resources/features/ - - - - - copy-gherkin-flagd-rpc-caching.feature - validate - - exec - - - cp - - test-harness/gherkin/flagd-rpc-caching.feature - src/test/resources/features/ - - - - - copy-gherkin-config.feature - validate - - exec - - - - - cp - - test-harness/gherkin/config.feature - src/test/resources/features/ - - - - - copy-gherkin-flagd-reconnect.feature - validate - - exec - - - - - cp - - test-harness/gherkin/flagd-reconnect.feature - src/test/resources/features/ - - - diff --git a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunConfigCucumberTest.java b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunConfigCucumberTest.java index 754ac7e32..0ef8b36be 100644 --- a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunConfigCucumberTest.java +++ b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunConfigCucumberTest.java @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Order; import org.junit.platform.suite.api.ConfigurationParameter; import org.junit.platform.suite.api.IncludeEngines; -import org.junit.platform.suite.api.SelectClasspathResource; +import org.junit.platform.suite.api.SelectFile; import org.junit.platform.suite.api.Suite; /** @@ -16,7 +16,7 @@ @Order(value = Integer.MAX_VALUE) @Suite @IncludeEngines("cucumber") -@SelectClasspathResource("features/config.feature") +@SelectFile("test-harness/gherkin/config.feature") @ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty") @ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "dev.openfeature.contrib.providers.flagd.e2e.steps.config") public class RunConfigCucumberTest {} diff --git a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessCucumberTest.java b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessCucumberTest.java index 82b2b238b..39ff92993 100644 --- a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessCucumberTest.java +++ b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessCucumberTest.java @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Order; import org.junit.platform.suite.api.ConfigurationParameter; import org.junit.platform.suite.api.IncludeEngines; -import org.junit.platform.suite.api.SelectClasspathResource; +import org.junit.platform.suite.api.SelectFile; import org.junit.platform.suite.api.Suite; import org.testcontainers.junit.jupiter.Testcontainers; @@ -17,9 +17,9 @@ @Order(value = Integer.MAX_VALUE) @Suite @IncludeEngines("cucumber") -@SelectClasspathResource("features/evaluation.feature") -@SelectClasspathResource("features/flagd-json-evaluator.feature") -@SelectClasspathResource("features/flagd.feature") +@SelectFile("spec/specification/assets/gherkin/evaluation.feature") +@SelectFile("test-harness/gherkin/flagd-json-evaluator.feature") +@SelectFile("test-harness/gherkin/flagd.feature") @ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty") @ConfigurationParameter( key = GLUE_PROPERTY_NAME, diff --git a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessEnvoyCucumberTest.java b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessEnvoyCucumberTest.java index bf7c5c243..a2bb60793 100644 --- a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessEnvoyCucumberTest.java +++ b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessEnvoyCucumberTest.java @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Order; import org.junit.platform.suite.api.ConfigurationParameter; import org.junit.platform.suite.api.IncludeEngines; -import org.junit.platform.suite.api.SelectClasspathResource; +import org.junit.platform.suite.api.SelectFile; import org.junit.platform.suite.api.Suite; import org.testcontainers.junit.jupiter.Testcontainers; @@ -17,9 +17,9 @@ @Order(value = Integer.MAX_VALUE) @Suite @IncludeEngines("cucumber") -@SelectClasspathResource("features/evaluation.feature") -@SelectClasspathResource("features/flagd-json-evaluator.feature") -@SelectClasspathResource("features/flagd.feature") +@SelectFile("spec/specification/assets/gherkin/evaluation.feature") +@SelectFile("test-harness/gherkin/flagd-json-evaluator.feature") +@SelectFile("test-harness/gherkin/flagd.feature") @ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty") @ConfigurationParameter( key = GLUE_PROPERTY_NAME, diff --git a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessReconnectCucumberTest.java b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessReconnectCucumberTest.java index 8a6dfbe47..346d9b5a4 100644 --- a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessReconnectCucumberTest.java +++ b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessReconnectCucumberTest.java @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Order; import org.junit.platform.suite.api.ConfigurationParameter; import org.junit.platform.suite.api.IncludeEngines; -import org.junit.platform.suite.api.SelectClasspathResource; +import org.junit.platform.suite.api.SelectFile; import org.junit.platform.suite.api.Suite; import org.testcontainers.junit.jupiter.Testcontainers; @@ -14,7 +14,7 @@ @Order(value = Integer.MAX_VALUE) @Suite @IncludeEngines("cucumber") -@SelectClasspathResource("features/flagd-reconnect.feature") +@SelectFile("test-harness/gherkin/flagd-reconnect.feature") @ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty") @ConfigurationParameter( key = GLUE_PROPERTY_NAME, diff --git a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessSSLCucumberTest.java b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessSSLCucumberTest.java index 86b49125e..ae7ca415b 100644 --- a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessSSLCucumberTest.java +++ b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessSSLCucumberTest.java @@ -13,7 +13,7 @@ @Order(value = Integer.MAX_VALUE) @Suite(failIfNoTests = false) @IncludeEngines("cucumber") -// @SelectClasspathResource("features/evaluation.feature") +// @SelectFile("spec/specification/assets/gherkin/evaluation.feature") @ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty") @ConfigurationParameter( key = GLUE_PROPERTY_NAME, diff --git a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcCucumberTest.java b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcCucumberTest.java index 602159ab9..e0d872b9f 100644 --- a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcCucumberTest.java +++ b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcCucumberTest.java @@ -6,7 +6,7 @@ import org.apache.logging.log4j.core.config.Order; import org.junit.platform.suite.api.ConfigurationParameter; import org.junit.platform.suite.api.IncludeEngines; -import org.junit.platform.suite.api.SelectClasspathResource; +import org.junit.platform.suite.api.SelectFile; import org.junit.platform.suite.api.Suite; import org.testcontainers.junit.jupiter.Testcontainers; @@ -17,10 +17,10 @@ @Order(value = Integer.MAX_VALUE) @Suite @IncludeEngines("cucumber") -@SelectClasspathResource("features/evaluation.feature") -@SelectClasspathResource("features/flagd-json-evaluator.feature") -@SelectClasspathResource("features/flagd.feature") -@SelectClasspathResource("features/flagd-rpc-caching.feature") +@SelectFile("spec/specification/assets/gherkin/evaluation.feature") +@SelectFile("test-harness/gherkin/flagd-json-evaluator.feature") +@SelectFile("test-harness/gherkin/flagd.feature") +@SelectFile("test-harness/gherkin/flagd-rpc-caching.feature") @ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty") @ConfigurationParameter( key = GLUE_PROPERTY_NAME, diff --git a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcReconnectCucumberTest.java b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcReconnectCucumberTest.java index 89eebe724..436ebf00f 100644 --- a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcReconnectCucumberTest.java +++ b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcReconnectCucumberTest.java @@ -6,7 +6,7 @@ import org.apache.logging.log4j.core.config.Order; import org.junit.platform.suite.api.ConfigurationParameter; import org.junit.platform.suite.api.IncludeEngines; -import org.junit.platform.suite.api.SelectClasspathResource; +import org.junit.platform.suite.api.SelectFile; import org.junit.platform.suite.api.Suite; import org.testcontainers.junit.jupiter.Testcontainers; @@ -14,7 +14,7 @@ @Order(value = Integer.MAX_VALUE) @Suite @IncludeEngines("cucumber") -@SelectClasspathResource("features/flagd-reconnect.feature") +@SelectFile("test-harness/gherkin/flagd-reconnect.feature") @ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty") @ConfigurationParameter( key = GLUE_PROPERTY_NAME, diff --git a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcSSLCucumberTest.java b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcSSLCucumberTest.java index 4a30f6b9f..f09846d41 100644 --- a/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcSSLCucumberTest.java +++ b/providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcSSLCucumberTest.java @@ -6,7 +6,7 @@ import org.apache.logging.log4j.core.config.Order; import org.junit.platform.suite.api.ConfigurationParameter; import org.junit.platform.suite.api.IncludeEngines; -import org.junit.platform.suite.api.SelectClasspathResource; +import org.junit.platform.suite.api.SelectFile; import org.junit.platform.suite.api.Suite; import org.testcontainers.junit.jupiter.Testcontainers; @@ -14,7 +14,7 @@ @Order(value = Integer.MAX_VALUE) @Suite @IncludeEngines("cucumber") -@SelectClasspathResource("features/evaluation.feature") +@SelectFile("spec/specification/assets/gherkin/evaluation.feature") @ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty") @ConfigurationParameter( key = GLUE_PROPERTY_NAME, diff --git a/providers/flagd/src/test/resources/features/.gitignore b/providers/flagd/src/test/resources/features/.gitignore deleted file mode 100644 index d2092accf..000000000 --- a/providers/flagd/src/test/resources/features/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.feature \ No newline at end of file diff --git a/providers/flagd/src/test/resources/features/.gitkeep b/providers/flagd/src/test/resources/features/.gitkeep deleted file mode 100644 index e69de29bb..000000000