From 44acc5b41eb65b8adfe8a3c709a009665fbe057d Mon Sep 17 00:00:00 2001 From: Pablo Carle Date: Tue, 11 Aug 2026 13:33:16 +0200 Subject: [PATCH 1/3] update test Signed-off-by: Pablo Carle --- .../apiml/functional/caching/CachingAuthenticationTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-tests/src/test/java/org/zowe/apiml/functional/caching/CachingAuthenticationTest.java b/integration-tests/src/test/java/org/zowe/apiml/functional/caching/CachingAuthenticationTest.java index aa84fb09eb..25ae4a6247 100644 --- a/integration-tests/src/test/java/org/zowe/apiml/functional/caching/CachingAuthenticationTest.java +++ b/integration-tests/src/test/java/org/zowe/apiml/functional/caching/CachingAuthenticationTest.java @@ -113,14 +113,14 @@ void givenNoCertificateAndHeader_cachingApiEndpointsAreInaccessible() { } @Test - void givenCertificateButNoHeader_cachingApiEndpointsAreInaccessible() { + void givenCertificateButNoHeader_cachingApiEndpointsIsAccessible() { given() .config(SslContext.clientCertApiml) .when() .get(caching_url + CACHING_PATH) .then() - .statusCode(HttpStatus.UNAUTHORIZED.value()); + .statusCode(HttpStatus.OK.value()); } @Test From 6d8f8857fb08a293e9ec08d010840d35d995f9fa Mon Sep 17 00:00:00 2001 From: Pablo Carle Date: Tue, 11 Aug 2026 13:41:02 +0200 Subject: [PATCH 2/3] enable tests Signed-off-by: Pablo Carle --- integration-tests/build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/integration-tests/build.gradle b/integration-tests/build.gradle index f0e0c2c69f..0153e51ace 100644 --- a/integration-tests/build.gradle +++ b/integration-tests/build.gradle @@ -146,7 +146,6 @@ task runAllIntegrationTestsNormal(type: Test) { 'SAFAuthTest', 'HATest', 'ChaoticHATest', - 'NotAttlsTest', 'OidcOauth2Test', 'MultipleRegistrationsTest', 'HealthEndpointProtectionDisabledTest', From c721b318003981cad43a578403a2d4612703e9a8 Mon Sep 17 00:00:00 2001 From: Pablo Carle Date: Thu, 27 Aug 2026 18:20:46 +0200 Subject: [PATCH 3/3] wip fix tests Signed-off-by: Pablo Carle --- config/local/caching-service.yml | 27 +++++++++++ .../caching/CachingAuthenticationTest.java | 45 ++++++++++--------- .../external/MetricServiceTest.java | 1 + 3 files changed, 51 insertions(+), 22 deletions(-) create mode 100644 config/local/caching-service.yml diff --git a/config/local/caching-service.yml b/config/local/caching-service.yml new file mode 100644 index 0000000000..4f0bf765b7 --- /dev/null +++ b/config/local/caching-service.yml @@ -0,0 +1,27 @@ +spring.profiles.active: debug,diag + +apiml: + service: + port: 10025 + banner: console + security: + x509: + certificatesUrl: https://localhost:10010/gateway/certificates +jgroups: + bind: + port: 7600 + address: localhost +caching: + storage: + mode: infinispan + infinispan: + initialHosts: localhost[7099] + +management: + endpoints: + web: + exposure: + include: "*" + +logging: + pattern: '%d{yyyy-MM-dd HH:mm:ss.SSS,UTC} <%blue(${logbackServiceName}):%magenta(%thread):${PID:}> %X{userid:-} %clr(%-5level) %cyan(\(%logger{15}\)) %msg%n' diff --git a/integration-tests/src/test/java/org/zowe/apiml/functional/caching/CachingAuthenticationTest.java b/integration-tests/src/test/java/org/zowe/apiml/functional/caching/CachingAuthenticationTest.java index 25ae4a6247..0547d18622 100644 --- a/integration-tests/src/test/java/org/zowe/apiml/functional/caching/CachingAuthenticationTest.java +++ b/integration-tests/src/test/java/org/zowe/apiml/functional/caching/CachingAuthenticationTest.java @@ -85,9 +85,9 @@ class WhenCalledWithInvalidAuthentication { @MethodSource("org.zowe.apiml.functional.caching.CachingAuthenticationTest#publicUrls") void publicEndpointIsAccessible(String endpoint) { given() - .when() + .when() .get(caching_url + endpoint) - .then() + .then() .statusCode(HttpStatus.OK.value()); } @@ -96,9 +96,9 @@ void givenUntrustedCert_cachingApiEndpointsAreInaccessible() { given() .config(SslContext.selfSignedUntrusted) .header(CERT_HEADER_NAME, "value") - .when() + .when() .get(caching_url + CACHING_PATH) - .then() + .then() .statusCode(HttpStatus.FORBIDDEN.value()); } @@ -106,50 +106,51 @@ void givenUntrustedCert_cachingApiEndpointsAreInaccessible() { void givenNoCertificateAndHeader_cachingApiEndpointsAreInaccessible() { given() .header(CERT_HEADER_NAME, "value") - .when() + .when() .get(caching_url + CACHING_PATH) - .then() + .then() .statusCode(HttpStatus.FORBIDDEN.value()); } - @Test - void givenCertificateButNoHeader_cachingApiEndpointsIsAccessible() { - - given() - .config(SslContext.clientCertApiml) - .when() - .get(caching_url + CACHING_PATH) - .then() - .statusCode(HttpStatus.OK.value()); - } - @Test void givenNoCertificateAndNoHeader_cachingApiEndpointsAreInaccessible() { given() - .when() + .when() .get(caching_url + CACHING_PATH) - .then() + .then() .statusCode(HttpStatus.FORBIDDEN.value()); } } @Nested class WhenCalledWithValidAuthentication { + + @Test + void givenCertificateButNoHeader_cachingApiEndpointsIsAccessible() { + given() + .config(SslContext.clientCertApiml) + .when() + .get(caching_url + CACHING_PATH) + .then() + .statusCode(HttpStatus.OK.value()); + } + @Test void cachingApiEndpointsAccessible() { given() .config(SslContext.clientCertApiml) .header(CLIENT_CERT_HEADER, clientCertValue) - .when() + .when() .get(caching_url + CACHING_PATH) - .then() + .then() .statusCode(HttpStatus.OK.value()); } - } + } private void clearSsl() { RestAssured.config = RestAssured.config().sslConfig(SSLConfig.sslConfig()); RestAssured.useRelaxedHTTPSValidation(); } + } diff --git a/integration-tests/src/test/java/org/zowe/apiml/integration/external/MetricServiceTest.java b/integration-tests/src/test/java/org/zowe/apiml/integration/external/MetricServiceTest.java index 88cc4b5b90..900f06e77f 100644 --- a/integration-tests/src/test/java/org/zowe/apiml/integration/external/MetricServiceTest.java +++ b/integration-tests/src/test/java/org/zowe/apiml/integration/external/MetricServiceTest.java @@ -46,4 +46,5 @@ void allClustersAreAvailable() { .then() .body("name", hasItems("GATEWAY", "DISCOVERY","APICATALOG")); } + }