Fix tests on CS build when cloudstack-management service is running (#8009)

This commit is contained in:
slavkap 2023-09-27 17:02:07 +03:00 committed by GitHub
parent 28c4be1cf2
commit 3c608290db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,8 @@ public class ScaleIOGatewayClientImplTest {
@Rule
public WireMockRule wireMockRule = new WireMockRule(wireMockConfig()
.httpsPort(port)
.dynamicHttpsPort()
.dynamicPort()
.needClientAuth(false)
.basicAdminAuthenticator(username, password)
.bindAddress("localhost"));
@ -70,7 +71,7 @@ public class ScaleIOGatewayClientImplTest {
.withHeader("content-type", "application/json;charset=UTF-8")
.withBody(sessionKey)));
client = new ScaleIOGatewayClientImpl(String.format("https://localhost:%d/api", port), username, password, false, timeout, maxConnections);
client = new ScaleIOGatewayClientImpl(String.format("https://localhost:%d/api", wireMockRule.httpsPort()), username, password, false, timeout, maxConnections);
wireMockRule.stubFor(post("/api/types/Volume/instances")
.willReturn(aResponse()