From 7d1e3e7bac8fdac4589197ec56cc35a4ccf6c2a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Jare=C5=A1?= Date: Thu, 7 Nov 2024 08:52:16 +0100 Subject: [PATCH] fix test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pavel Jareš --- .../schemes/PassticketSchemeTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/integration-tests/src/test/java/org/zowe/apiml/integration/authentication/schemes/PassticketSchemeTest.java b/integration-tests/src/test/java/org/zowe/apiml/integration/authentication/schemes/PassticketSchemeTest.java index 7c9f9d142a..11c84e424a 100644 --- a/integration-tests/src/test/java/org/zowe/apiml/integration/authentication/schemes/PassticketSchemeTest.java +++ b/integration-tests/src/test/java/org/zowe/apiml/integration/authentication/schemes/PassticketSchemeTest.java @@ -25,8 +25,8 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.CsvSource; import org.junit.jupiter.params.provider.MethodSource; -import org.junit.jupiter.params.provider.ValueSource; import org.zowe.apiml.constants.ApimlConstants; import org.zowe.apiml.util.TestWithStartedInstances; import org.zowe.apiml.util.categories.*; @@ -279,19 +279,19 @@ void givenCustomHeader() { @Nested class PassticketMisconfiguration { - @ParameterizedTest - @ValueSource(strings = { - "/dcpassticketxbadappl/api/v1/request", - "/dcnopassticket/api/v1/request" + @ParameterizedTest(name = "{2} ({0})") + @CsvSource({ + "/dcpassticketxbadappl/api/v1/request,500,Passticket is misconfigured then return 500", + "/dcnopassticket/api/v1/request,200,When APPLID is not set then passticket is not set and the Gateway returns 200" }) - void givenJwt(String url) { + void givenJwt(String url, int responseCode, String description) { given() .cookie(COOKIE_NAME, jwt) .when() .get(HttpRequestUtils.getUriFromGateway(url)) .then() .body("headers.authorization", Matchers.nullValue()) - .statusCode(200); + .statusCode(responseCode); } }