Skip to content

Commit 15f8e59

Browse files
authored
test(flagd): replace buildsteps with proper annotations. (#1116)
Signed-off-by: Simon Schrottner <[email protected]>
1 parent 2471824 commit 15f8e59

11 files changed

+22
-117
lines changed

providers/flagd/pom.xml

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -299,100 +299,6 @@
299299
</arguments>
300300
</configuration>
301301
</execution>
302-
<execution>
303-
<id>copy-gherkin-evaluation.feature</id>
304-
<phase>validate</phase>
305-
<goals>
306-
<goal>exec</goal>
307-
</goals>
308-
<configuration>
309-
<!-- copy the feature spec we want to test into resources so them can be easily loaded -->
310-
<!-- run: cp test-harness/features/evaluation.feature src/test/resources/features/ -->
311-
<executable>cp</executable>
312-
<arguments>
313-
<argument>spec/specification/assets/gherkin/evaluation.feature</argument>
314-
<argument>src/test/resources/features/</argument>
315-
</arguments>
316-
</configuration>
317-
</execution>
318-
<execution>
319-
<id>copy-gherkin-flagd-json-evaluator.feature</id>
320-
<phase>validate</phase>
321-
<goals>
322-
<goal>exec</goal>
323-
</goals>
324-
<configuration>
325-
<!-- copy the feature spec we want to test into resources so them can be easily loaded -->
326-
<!-- run: cp test-harness/features/flagd-json-evaluator.feature src/test/resources/features/ -->
327-
<executable>cp</executable>
328-
<arguments>
329-
<argument>test-harness/gherkin/flagd-json-evaluator.feature</argument>
330-
<argument>src/test/resources/features/</argument>
331-
</arguments>
332-
</configuration>
333-
</execution>
334-
<execution>
335-
<id>copy-gherkin-flagd.feature</id>
336-
<phase>validate</phase>
337-
<goals>
338-
<goal>exec</goal>
339-
</goals>
340-
<configuration>
341-
<!-- copy the feature spec we want to test into resources so them can be easily loaded -->
342-
<!-- run: cp test-harness/features/flagd.feature src/test/resources/features/ -->
343-
<executable>cp</executable>
344-
<arguments>
345-
<argument>test-harness/gherkin/flagd.feature</argument>
346-
<argument>src/test/resources/features/</argument>
347-
</arguments>
348-
</configuration>
349-
</execution>
350-
<execution>
351-
<id>copy-gherkin-flagd-rpc-caching.feature</id>
352-
<phase>validate</phase>
353-
<goals>
354-
<goal>exec</goal>
355-
</goals>
356-
<configuration>
357-
<executable>cp</executable>
358-
<arguments>
359-
<argument>test-harness/gherkin/flagd-rpc-caching.feature</argument>
360-
<argument>src/test/resources/features/</argument>
361-
</arguments>
362-
</configuration>
363-
</execution>
364-
<execution>
365-
<id>copy-gherkin-config.feature</id>
366-
<phase>validate</phase>
367-
<goals>
368-
<goal>exec</goal>
369-
</goals>
370-
<configuration>
371-
<!-- copy the feature spec we want to test into resources so them can be easily loaded -->
372-
<!-- run: cp test-harness/features/flagd.feature src/test/resources/features/ -->
373-
<executable>cp</executable>
374-
<arguments>
375-
<argument>test-harness/gherkin/config.feature</argument>
376-
<argument>src/test/resources/features/</argument>
377-
</arguments>
378-
</configuration>
379-
</execution>
380-
<execution>
381-
<id>copy-gherkin-flagd-reconnect.feature</id>
382-
<phase>validate</phase>
383-
<goals>
384-
<goal>exec</goal>
385-
</goals>
386-
<configuration>
387-
<!-- copy the feature spec we want to test into resources so them can be easily loaded -->
388-
<!-- run: cp test-harness/features/flagd-reconnect.feature src/test/resources/features/ -->
389-
<executable>cp</executable>
390-
<arguments>
391-
<argument>test-harness/gherkin/flagd-reconnect.feature</argument>
392-
<argument>src/test/resources/features/</argument>
393-
</arguments>
394-
</configuration>
395-
</execution>
396302
</executions>
397303
</plugin>
398304
</plugins>

providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunConfigCucumberTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import org.junit.jupiter.api.Order;
77
import org.junit.platform.suite.api.ConfigurationParameter;
88
import org.junit.platform.suite.api.IncludeEngines;
9-
import org.junit.platform.suite.api.SelectClasspathResource;
9+
import org.junit.platform.suite.api.SelectFile;
1010
import org.junit.platform.suite.api.Suite;
1111

1212
/**
@@ -16,7 +16,7 @@
1616
@Order(value = Integer.MAX_VALUE)
1717
@Suite
1818
@IncludeEngines("cucumber")
19-
@SelectClasspathResource("features/config.feature")
19+
@SelectFile("test-harness/gherkin/config.feature")
2020
@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty")
2121
@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "dev.openfeature.contrib.providers.flagd.e2e.steps.config")
2222
public class RunConfigCucumberTest {}

providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessCucumberTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import org.junit.jupiter.api.Order;
77
import org.junit.platform.suite.api.ConfigurationParameter;
88
import org.junit.platform.suite.api.IncludeEngines;
9-
import org.junit.platform.suite.api.SelectClasspathResource;
9+
import org.junit.platform.suite.api.SelectFile;
1010
import org.junit.platform.suite.api.Suite;
1111
import org.testcontainers.junit.jupiter.Testcontainers;
1212

@@ -17,9 +17,9 @@
1717
@Order(value = Integer.MAX_VALUE)
1818
@Suite
1919
@IncludeEngines("cucumber")
20-
@SelectClasspathResource("features/evaluation.feature")
21-
@SelectClasspathResource("features/flagd-json-evaluator.feature")
22-
@SelectClasspathResource("features/flagd.feature")
20+
@SelectFile("spec/specification/assets/gherkin/evaluation.feature")
21+
@SelectFile("test-harness/gherkin/flagd-json-evaluator.feature")
22+
@SelectFile("test-harness/gherkin/flagd.feature")
2323
@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty")
2424
@ConfigurationParameter(
2525
key = GLUE_PROPERTY_NAME,

providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessEnvoyCucumberTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import org.junit.jupiter.api.Order;
77
import org.junit.platform.suite.api.ConfigurationParameter;
88
import org.junit.platform.suite.api.IncludeEngines;
9-
import org.junit.platform.suite.api.SelectClasspathResource;
9+
import org.junit.platform.suite.api.SelectFile;
1010
import org.junit.platform.suite.api.Suite;
1111
import org.testcontainers.junit.jupiter.Testcontainers;
1212

@@ -17,9 +17,9 @@
1717
@Order(value = Integer.MAX_VALUE)
1818
@Suite
1919
@IncludeEngines("cucumber")
20-
@SelectClasspathResource("features/evaluation.feature")
21-
@SelectClasspathResource("features/flagd-json-evaluator.feature")
22-
@SelectClasspathResource("features/flagd.feature")
20+
@SelectFile("spec/specification/assets/gherkin/evaluation.feature")
21+
@SelectFile("test-harness/gherkin/flagd-json-evaluator.feature")
22+
@SelectFile("test-harness/gherkin/flagd.feature")
2323
@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty")
2424
@ConfigurationParameter(
2525
key = GLUE_PROPERTY_NAME,

providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessReconnectCucumberTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
import org.junit.jupiter.api.Order;
77
import org.junit.platform.suite.api.ConfigurationParameter;
88
import org.junit.platform.suite.api.IncludeEngines;
9-
import org.junit.platform.suite.api.SelectClasspathResource;
9+
import org.junit.platform.suite.api.SelectFile;
1010
import org.junit.platform.suite.api.Suite;
1111
import org.testcontainers.junit.jupiter.Testcontainers;
1212

1313
/** Class for running the reconnection tests for the in-process provider */
1414
@Order(value = Integer.MAX_VALUE)
1515
@Suite
1616
@IncludeEngines("cucumber")
17-
@SelectClasspathResource("features/flagd-reconnect.feature")
17+
@SelectFile("test-harness/gherkin/flagd-reconnect.feature")
1818
@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty")
1919
@ConfigurationParameter(
2020
key = GLUE_PROPERTY_NAME,

providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdInProcessSSLCucumberTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
@Order(value = Integer.MAX_VALUE)
1414
@Suite(failIfNoTests = false)
1515
@IncludeEngines("cucumber")
16-
// @SelectClasspathResource("features/evaluation.feature")
16+
// @SelectFile("spec/specification/assets/gherkin/evaluation.feature")
1717
@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty")
1818
@ConfigurationParameter(
1919
key = GLUE_PROPERTY_NAME,

providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcCucumberTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import org.apache.logging.log4j.core.config.Order;
77
import org.junit.platform.suite.api.ConfigurationParameter;
88
import org.junit.platform.suite.api.IncludeEngines;
9-
import org.junit.platform.suite.api.SelectClasspathResource;
9+
import org.junit.platform.suite.api.SelectFile;
1010
import org.junit.platform.suite.api.Suite;
1111
import org.testcontainers.junit.jupiter.Testcontainers;
1212

@@ -17,10 +17,10 @@
1717
@Order(value = Integer.MAX_VALUE)
1818
@Suite
1919
@IncludeEngines("cucumber")
20-
@SelectClasspathResource("features/evaluation.feature")
21-
@SelectClasspathResource("features/flagd-json-evaluator.feature")
22-
@SelectClasspathResource("features/flagd.feature")
23-
@SelectClasspathResource("features/flagd-rpc-caching.feature")
20+
@SelectFile("spec/specification/assets/gherkin/evaluation.feature")
21+
@SelectFile("test-harness/gherkin/flagd-json-evaluator.feature")
22+
@SelectFile("test-harness/gherkin/flagd.feature")
23+
@SelectFile("test-harness/gherkin/flagd-rpc-caching.feature")
2424
@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty")
2525
@ConfigurationParameter(
2626
key = GLUE_PROPERTY_NAME,

providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcReconnectCucumberTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
import org.apache.logging.log4j.core.config.Order;
77
import org.junit.platform.suite.api.ConfigurationParameter;
88
import org.junit.platform.suite.api.IncludeEngines;
9-
import org.junit.platform.suite.api.SelectClasspathResource;
9+
import org.junit.platform.suite.api.SelectFile;
1010
import org.junit.platform.suite.api.Suite;
1111
import org.testcontainers.junit.jupiter.Testcontainers;
1212

1313
/** Class for running the reconnection tests for the RPC provider */
1414
@Order(value = Integer.MAX_VALUE)
1515
@Suite
1616
@IncludeEngines("cucumber")
17-
@SelectClasspathResource("features/flagd-reconnect.feature")
17+
@SelectFile("test-harness/gherkin/flagd-reconnect.feature")
1818
@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty")
1919
@ConfigurationParameter(
2020
key = GLUE_PROPERTY_NAME,

providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/RunFlagdRpcSSLCucumberTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
import org.apache.logging.log4j.core.config.Order;
77
import org.junit.platform.suite.api.ConfigurationParameter;
88
import org.junit.platform.suite.api.IncludeEngines;
9-
import org.junit.platform.suite.api.SelectClasspathResource;
9+
import org.junit.platform.suite.api.SelectFile;
1010
import org.junit.platform.suite.api.Suite;
1111
import org.testcontainers.junit.jupiter.Testcontainers;
1212

1313
/** Class for running the reconnection tests for the RPC provider */
1414
@Order(value = Integer.MAX_VALUE)
1515
@Suite
1616
@IncludeEngines("cucumber")
17-
@SelectClasspathResource("features/evaluation.feature")
17+
@SelectFile("spec/specification/assets/gherkin/evaluation.feature")
1818
@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty")
1919
@ConfigurationParameter(
2020
key = GLUE_PROPERTY_NAME,

providers/flagd/src/test/resources/features/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

providers/flagd/src/test/resources/features/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)