Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.uid2</groupId>
<artifactId>uid2-e2e</artifactId>
<version>4.0.0</version>
<version>4.0.1-alpha-66-SNAPSHOT</version>

<properties>
<maven.compiler.source>21</maven.compiler.source>
Expand Down
6 changes: 6 additions & 0 deletions src/test/java/app/component/Core.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,10 @@ public JsonNode getWithOptOutApiToken(String path) throws Exception {
String response = HttpClient.get(getBaseUrl() + path, OPTOUT_API_KEY);
return OBJECT_MAPPER.readTree(response);
}

public JsonNode getOperatorConfig() throws Exception {
Map<String, String> headers = new HashMap<>();
String response = HttpClient.get(getBaseUrl() + "/operator/config", OPERATOR_API_KEY, headers);
return OBJECT_MAPPER.readTree(response);
}
}
17 changes: 17 additions & 0 deletions src/test/java/suite/core/CoreTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,21 @@ public void testAttest_ValidAttestationRequest(Core core) throws Exception {
private static JsonObject getConfig() {
return new JsonObject("{ \"aws_kms_jwt_signing_public_keys\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmvwB41qI5Fe41PDbXqcX5uOvSvfKh8l9QV0O3M+NsB4lKqQEP0t1hfoiXTpOgKz1ArYxHsQ2LeXifX4uwEbYJFlpVM+tyQkTWQjBOw6fsLYK2Xk4X2ylNXUUf7x3SDiOVxyvTh3OZW9kqrDBN9JxSoraNLyfw0hhW0SHpfs699SehgbQ7QWep/gVlKRLIz0XAXaZNw24s79ORcQlrCE6YD0PgQmpI/dK5xMML82n6y3qcTlywlGaU7OGIMdD+CTXA3BcOkgXeqZTXNaX1u6jCTa1lvAczun6avp5VZ4TFiuPo+y4rJ3GU+14cyT5NckEcaTKSvd86UdwK5Id9tl3bQIDAQAB\"}");
}

@ParameterizedTest(name = "/operator/config - {0}")
@MethodSource({
"suite.core.TestData#baseArgs"
})
public void testOpertorConfig_ValidRequest(Core core) throws Exception {
JsonNode response = core.getOperatorConfig();

assertAll("testOpertorConfig_ValidRequest has valid response",
() -> assertNotNull(response),
() -> assertInstanceOf(Integer.class, response.get("version").asInt()),
() -> {
JsonNode runtimeConfig = response.get("runtime_config");
assertNotNull(runtimeConfig, "runtime_config should not be null");
}
);
}
}