Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Commit

Permalink
fix(test): Select a dynamic HTTP port
Browse files Browse the repository at this point in the history
  • Loading branch information
brasseld committed Oct 16, 2018
1 parent 4c88779 commit 24287eb
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 1 deletion.
Expand Up @@ -63,6 +63,7 @@ public class ClientAuthenticationJKSTest extends AbstractGatewayTest {
// Generate the client truststore
// keytool -import -noprompt -trustcacerts -alias selfsigned -file keystore01.cert -keystore truststore01.jks -keypass password -storepass password
private WireMockRule wireMockRule = new WireMockRule(wireMockConfig()
.dynamicPort()
.dynamicHttpsPort()
.needClientAuth(true)
.trustStorePath(ClientAuthenticationJKSTest.class.getResource("/io/gravitee/gateway/standalone/truststore01.jks").getPath())
Expand Down
Expand Up @@ -58,6 +58,7 @@ public class ClientAuthenticationPEMInlineTest extends AbstractGatewayTest {
// openssl pkcs12 -in keystore.p12 -passin pass:password -nokeys -out client-cert.pem

private WireMockRule wireMockRule = new WireMockRule(wireMockConfig()
.dynamicPort()
.dynamicHttpsPort()
.needClientAuth(true)
.trustStorePath(ClientAuthenticationPEMInlineTest.class.getResource("/io/gravitee/gateway/standalone/truststore01.jks").getPath())
Expand Down
Expand Up @@ -61,6 +61,7 @@ public class ClientAuthenticationPEMTest extends AbstractGatewayTest {
// openssl pkcs12 -in keystore.p12 -passin pass:password -nokeys -out client-cert.pem

private WireMockRule wireMockRule = new WireMockRule(wireMockConfig()
.dynamicPort()
.dynamicHttpsPort()
.needClientAuth(true)
.trustStorePath(ClientAuthenticationPEMTest.class.getResource("/io/gravitee/gateway/standalone/truststore01.jks").getPath())
Expand Down
Expand Up @@ -63,6 +63,7 @@ public class ClientAuthenticationPKCS12Test extends AbstractGatewayTest {
// keytool -importkeystore -srckeystore truststore01.jks -srcstorepass password -destkeystore truststore.p12 -deststoretype PKCS12 -deststorepass password

private WireMockRule wireMockRule = new WireMockRule(wireMockConfig()
.dynamicPort()
.dynamicHttpsPort()
.needClientAuth(true)
.trustStorePath(ClientAuthenticationPKCS12Test.class.getResource("/io/gravitee/gateway/standalone/truststore01.jks").getPath())
Expand Down
Expand Up @@ -52,7 +52,7 @@
)
public class CorsTest extends AbstractGatewayTest {

public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().dynamicPort());
public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().dynamicPort().dynamicHttpsPort());

@Rule
public final TestRule chain = RuleChain
Expand Down
Expand Up @@ -62,6 +62,7 @@ public class SSLJKSTrustStoreTest extends AbstractGatewayTest {
// Generate the client truststore
// keytool -import -noprompt -trustcacerts -alias selfsigned -file keystore01.cert -keystore truststore01.jks -keypass password -storepass password
private WireMockRule wireMockRule = new WireMockRule(wireMockConfig()
.dynamicPort()
.dynamicHttpsPort()
.keystorePath(SSLJKSTrustStoreTest.class.getResource("/io/gravitee/gateway/standalone/keystore01.jks").getPath())
.keystorePassword("password"));
Expand Down
Expand Up @@ -59,6 +59,7 @@ public class SSLPEMTrustStoreTest extends AbstractGatewayTest {
// openssl pkcs12 -in keystore.p12 -nokeys -passin pass:password -out server-cert.pem

private WireMockRule wireMockRule = new WireMockRule(wireMockConfig()
.dynamicPort()
.dynamicHttpsPort()
.keystorePath(SSLPEMTrustStoreTest.class.getResource("/io/gravitee/gateway/standalone/keystore01.jks").getPath())
.keystorePassword("password"));
Expand Down
Expand Up @@ -59,6 +59,7 @@ public class SSLPKCS12TrustStoreTest extends AbstractGatewayTest {
// Generate the client truststore
// keytool -importkeystore -srckeystore truststore01.jks -srcstorepass password -destkeystore truststore.p12 -deststoretype PKCS12 -deststorepass password
private WireMockRule wireMockRule = new WireMockRule(wireMockConfig()
.dynamicPort()
.dynamicHttpsPort()
.keystorePath(SSLPKCS12TrustStoreTest.class.getResource("/io/gravitee/gateway/standalone/keystore01.jks").getPath())
.keystorePassword("password"));
Expand Down

0 comments on commit 24287eb

Please sign in to comment.