From ecc2126ea6f10dc6b4e2d37de78deed2402b2939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Hern=C3=A1n=20Carle?= Date: Tue, 1 Aug 2023 14:28:25 +0200 Subject: [PATCH] fix test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pablo HernĂ¡n Carle --- .../org/zowe/apiml/gateway/security/login/ProvidersTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gateway-service/src/test/java/org/zowe/apiml/gateway/security/login/ProvidersTest.java b/gateway-service/src/test/java/org/zowe/apiml/gateway/security/login/ProvidersTest.java index 117e62441a..bf32756ac3 100644 --- a/gateway-service/src/test/java/org/zowe/apiml/gateway/security/login/ProvidersTest.java +++ b/gateway-service/src/test/java/org/zowe/apiml/gateway/security/login/ProvidersTest.java @@ -29,6 +29,7 @@ import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; +import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.zowe.apiml.security.common.config.AuthConfigurationProperties.JWT_AUTOCONFIGURATION_MODE.*; @@ -187,6 +188,8 @@ private void prepareValidZosmfInDiscovery() { when(discovery.getInstances(ZOSMF_ID)).thenReturn( Collections.singletonList(mock(ServiceInstance.class)) ); + when(discovery.getServices()).thenReturn(Collections.singletonList("serviceId")); // just verifies if there's at least one as a basic health + doNothing().when(discovery).probe(); when(authConfigurationProperties.validatedZosmfServiceId()).thenReturn(ZOSMF_ID); } }