diff --git a/pom.xml b/pom.xml index eed1e4f..537b473 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.uid2 uid2-e2e - 4.0.0 + 4.0.1-alpha-66-SNAPSHOT 21 diff --git a/src/test/java/app/component/Core.java b/src/test/java/app/component/Core.java index 4b9677f..27f32cd 100644 --- a/src/test/java/app/component/Core.java +++ b/src/test/java/app/component/Core.java @@ -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 headers = new HashMap<>(); + String response = HttpClient.get(getBaseUrl() + "/operator/config", OPERATOR_API_KEY, headers); + return OBJECT_MAPPER.readTree(response); + } } diff --git a/src/test/java/suite/core/CoreTest.java b/src/test/java/suite/core/CoreTest.java index 4ee9c0e..9b9fc20 100644 --- a/src/test/java/suite/core/CoreTest.java +++ b/src/test/java/suite/core/CoreTest.java @@ -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"); + } + ); + } }