Skip to content

Commit b0eb05a

Browse files
authored
Merge branch 'main' into feat/implement-tracking
2 parents 1ecffec + c5ad1b4 commit b0eb05a

File tree

10 files changed

+38
-34
lines changed

10 files changed

+38
-34
lines changed

.github/workflows/merge.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
server-password: ${{ secrets.OSSRH_PASSWORD }}
3333

3434
- name: Cache local Maven repository
35-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a
35+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
3636
with:
3737
path: ~/.m2/repository
3838
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -49,7 +49,7 @@ jobs:
4949
run: mvn --batch-mode --update-snapshots verify
5050

5151
- name: Upload coverage to Codecov
52-
uses: codecov/codecov-action@v5.0.7
52+
uses: codecov/codecov-action@v5.1.1
5353
with:
5454
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
5555
flags: unittests # optional

.github/workflows/pullrequest.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
cache: maven
2121

2222
- name: Initialize CodeQL
23-
uses: github/codeql-action/init@f8e782af5670be7b12c0acb5b25c1c5703b931b9
23+
uses: github/codeql-action/init@3096afedf9873361b2b2f65e1445b13272c83eb8
2424
with:
2525
languages: java
2626

2727
- name: Cache local Maven repository
28-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a
28+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
2929
with:
3030
path: ~/.m2/repository
3131
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -36,7 +36,7 @@ jobs:
3636
run: mvn --batch-mode --update-snapshots --activate-profiles e2e verify
3737

3838
- name: Upload coverage to Codecov
39-
uses: codecov/codecov-action@v5.0.7
39+
uses: codecov/codecov-action@v5.1.1
4040
with:
4141
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
4242
flags: unittests # optional
@@ -45,4 +45,4 @@ jobs:
4545
verbose: true # optional (default = false)
4646

4747
- name: Perform CodeQL Analysis
48-
uses: github/codeql-action/analyze@f8e782af5670be7b12c0acb5b25c1c5703b931b9
48+
uses: github/codeql-action/analyze@3096afedf9873361b2b2f65e1445b13272c83eb8

.github/workflows/static-code-scanning.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@f8e782af5670be7b12c0acb5b25c1c5703b931b9
36+
uses: github/codeql-action/init@3096afedf9873361b2b2f65e1445b13272c83eb8
3737
with:
3838
languages: java
3939

4040
- name: Autobuild
41-
uses: github/codeql-action/autobuild@f8e782af5670be7b12c0acb5b25c1c5703b931b9
41+
uses: github/codeql-action/autobuild@3096afedf9873361b2b2f65e1445b13272c83eb8
4242

4343
- name: Perform CodeQL Analysis
44-
uses: github/codeql-action/analyze@f8e782af5670be7b12c0acb5b25c1c5703b931b9
44+
uses: github/codeql-action/analyze@3096afedf9873361b2b2f65e1445b13272c83eb8

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "test-harness"]
2-
path = test-harness
3-
url = https://github.com/open-feature/test-harness
1+
[submodule "spec"]
2+
path = spec
3+
url = https://github.com/open-feature/spec/

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If you're adding tests to cover something in the spec, use the `@Specification`
2323

2424
## End-to-End Tests
2525

26-
The continuous integration runs a set of [gherkin e2e tests](https://github.com/open-feature/test-harness/blob/main/features/evaluation.feature) using `InMemoryProvider`.
26+
The continuous integration runs a set of [gherkin e2e tests](https://github.com/open-feature/spec/blob/main/specification/assets/gherkin/evaluation.feature) using `InMemoryProvider`.
2727

2828
to run alone:
2929
```

pom.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
<plugin>
201201
<groupId>org.cyclonedx</groupId>
202202
<artifactId>cyclonedx-maven-plugin</artifactId>
203-
<version>2.9.0</version>
203+
<version>2.9.1</version>
204204
<configuration>
205205
<projectType>library</projectType>
206206
<schemaVersion>1.3</schemaVersion>
@@ -554,22 +554,21 @@
554554
<argument>submodule</argument>
555555
<argument>update</argument>
556556
<argument>--init</argument>
557-
<argument>test-harness</argument>
557+
<argument>spec</argument>
558558
</arguments>
559559
</configuration>
560560
</execution>
561561
<execution>
562-
<id>copy-gherkin-tests</id>
562+
<id>copy-evaluation-gherkin-tests</id>
563563
<phase>validate</phase>
564564
<goals>
565565
<goal>exec</goal>
566566
</goals>
567567
<configuration>
568568
<!-- copy the feature spec we want to test into resources so them can be easily loaded -->
569-
<!-- run: cp test-harness/features/evaluation.feature src/test/resources/features/ -->
570569
<executable>cp</executable>
571570
<arguments>
572-
<argument>test-harness/features/evaluation.feature</argument>
571+
<argument>spec/specification/assets/gherkin/evaluation.feature</argument>
573572
<argument>src/test/resources/features/</argument>
574573
</arguments>
575574
</configuration>

spec

Submodule spec added at d4a9a91

src/test/java/dev/openfeature/sdk/e2e/RunCucumberTest.java renamed to src/test/java/dev/openfeature/sdk/e2e/EvaluationTest.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@
55
import org.junit.platform.suite.api.SelectClasspathResource;
66
import org.junit.platform.suite.api.Suite;
77

8+
import static io.cucumber.junit.platform.engine.Constants.GLUE_PROPERTY_NAME;
89
import static io.cucumber.junit.platform.engine.Constants.PLUGIN_PROPERTY_NAME;
910

1011
@Suite
1112
@IncludeEngines("cucumber")
12-
@SelectClasspathResource("features")
13+
@SelectClasspathResource("features/evaluation.feature")
1314
@ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty")
14-
public class RunCucumberTest {
15-
15+
@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "dev.openfeature.sdk.e2e.evaluation")
16+
public class EvaluationTest {
17+
1618
}
19+
20+
21+

src/test/java/dev/openfeature/sdk/e2e/StepDefinitions.java renamed to src/test/java/dev/openfeature/sdk/e2e/evaluation/StepDefinitions.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package dev.openfeature.sdk.e2e;
1+
package dev.openfeature.sdk.e2e.evaluation;
22

33
import dev.openfeature.sdk.Value;
44
import dev.openfeature.sdk.EvaluationContext;
@@ -52,7 +52,7 @@ public class StepDefinitions {
5252

5353
@SneakyThrows
5454
@BeforeAll()
55-
@Given("an openfeature client is registered with cache disabled")
55+
@Given("a provider is registered")
5656
public static void setup() {
5757
Map<String, Flag<?>> flags = buildFlags();
5858
InMemoryProvider provider = new InMemoryProvider(flags);
@@ -67,7 +67,7 @@ public static void setup() {
6767
// boolean value
6868
@When("a boolean flag with key {string} is evaluated with default value {string}")
6969
public void a_boolean_flag_with_key_boolean_flag_is_evaluated_with_default_value_false(String flagKey,
70-
String defaultValue) {
70+
String defaultValue) {
7171
this.booleanFlagValue = client.getBooleanValue(flagKey, Boolean.valueOf(defaultValue));
7272
}
7373

@@ -117,7 +117,7 @@ public void an_object_flag_with_key_is_evaluated_with_a_null_default_value(Strin
117117

118118
@Then("the resolved object value should be contain fields {string}, {string}, and {string}, with values {string}, {string} and {int}, respectively")
119119
public void the_resolved_object_value_should_be_contain_fields_and_with_values_and_respectively(String boolField,
120-
String stringField, String numberField, String boolValue, String stringValue, int numberValue) {
120+
String stringField, String numberField, String boolValue, String stringValue, int numberValue) {
121121
Structure structure = this.objectFlagValue.asStructure();
122122

123123
assertEquals(Boolean.valueOf(boolValue), structure.asMap().get(boolField).asBoolean());
@@ -132,7 +132,7 @@ public void the_resolved_object_value_should_be_contain_fields_and_with_values_a
132132
// boolean details
133133
@When("a boolean flag with key {string} is evaluated with details and default value {string}")
134134
public void a_boolean_flag_with_key_is_evaluated_with_details_and_default_value(String flagKey,
135-
String defaultValue) {
135+
String defaultValue) {
136136
this.booleanFlagDetails = client.getBooleanDetails(flagKey, Boolean.valueOf(defaultValue));
137137
}
138138

@@ -148,13 +148,13 @@ public void the_resolved_boolean_value_should_be_the_variant_should_be_and_the_r
148148
// string details
149149
@When("a string flag with key {string} is evaluated with details and default value {string}")
150150
public void a_string_flag_with_key_is_evaluated_with_details_and_default_value(String flagKey,
151-
String defaultValue) {
151+
String defaultValue) {
152152
this.stringFlagDetails = client.getStringDetails(flagKey, defaultValue);
153153
}
154154

155155
@Then("the resolved string details value should be {string}, the variant should be {string}, and the reason should be {string}")
156156
public void the_resolved_string_value_should_be_the_variant_should_be_and_the_reason_should_be(String expectedValue,
157-
String expectedVariant, String expectedReason) {
157+
String expectedVariant, String expectedReason) {
158158
assertEquals(expectedValue, this.stringFlagDetails.getValue());
159159
assertEquals(expectedVariant, this.stringFlagDetails.getVariant());
160160
assertEquals(expectedReason, this.stringFlagDetails.getReason());
@@ -168,7 +168,7 @@ public void an_integer_flag_with_key_is_evaluated_with_details_and_default_value
168168

169169
@Then("the resolved integer details value should be {int}, the variant should be {string}, and the reason should be {string}")
170170
public void the_resolved_integer_value_should_be_the_variant_should_be_and_the_reason_should_be(int expectedValue,
171-
String expectedVariant, String expectedReason) {
171+
String expectedVariant, String expectedReason) {
172172
assertEquals(expectedValue, this.intFlagDetails.getValue());
173173
assertEquals(expectedVariant, this.intFlagDetails.getVariant());
174174
assertEquals(expectedReason, this.intFlagDetails.getReason());
@@ -182,7 +182,7 @@ public void a_float_flag_with_key_is_evaluated_with_details_and_default_value(St
182182

183183
@Then("the resolved float details value should be {double}, the variant should be {string}, and the reason should be {string}")
184184
public void the_resolved_float_value_should_be_the_variant_should_be_and_the_reason_should_be(double expectedValue,
185-
String expectedVariant, String expectedReason) {
185+
String expectedVariant, String expectedReason) {
186186
assertEquals(expectedValue, this.doubleFlagDetails.getValue());
187187
assertEquals(expectedVariant, this.doubleFlagDetails.getVariant());
188188
assertEquals(expectedReason, this.doubleFlagDetails.getReason());
@@ -217,7 +217,7 @@ public void the_variant_should_be_and_the_reason_should_be(String expectedVarian
217217

218218
@When("context contains keys {string}, {string}, {string}, {string} with values {string}, {string}, {int}, {string}")
219219
public void context_contains_keys_with_values(String field1, String field2, String field3, String field4,
220-
String value1, String value2, Integer value3, String value4) {
220+
String value1, String value2, Integer value3, String value4) {
221221
Map<String, Value> attributes = new HashMap<>();
222222
attributes.put(field1, new Value(value1));
223223
attributes.put(field2, new Value(value2));
@@ -253,7 +253,7 @@ public void the_resolved_flag_value_is_when_the_context_is_empty(String expected
253253
// not found
254254
@When("a non-existent string flag with key {string} is evaluated with details and a default value {string}")
255255
public void a_non_existent_string_flag_with_key_is_evaluated_with_details_and_a_default_value(String flagKey,
256-
String defaultValue) {
256+
String defaultValue) {
257257
notFoundFlagKey = flagKey;
258258
notFoundDefaultValue = defaultValue;
259259
notFoundDetails = client.getStringDetails(notFoundFlagKey, notFoundDefaultValue);
@@ -273,7 +273,7 @@ public void the_reason_should_indicate_an_error_and_the_error_code_should_be_fla
273273
// type mismatch
274274
@When("a string flag with key {string} is evaluated as an integer, with details and a default value {int}")
275275
public void a_string_flag_with_key_is_evaluated_as_an_integer_with_details_and_a_default_value(String flagKey,
276-
int defaultValue) {
276+
int defaultValue) {
277277
typeErrorFlagKey = flagKey;
278278
typeErrorDefaultValue = defaultValue;
279279
typeErrorDetails = client.getIntegerDetails(typeErrorFlagKey, typeErrorDefaultValue);

test-harness

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

0 commit comments

Comments
 (0)