Skip to content

Commit 57d932b

Browse files
committed
Allow WireMockClassRule to work when HTTP is disabled
1 parent eb7abee commit 57d932b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/com/github/tomakehurst/wiremock/junit/WireMockClassRule.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ public void evaluate() throws Throwable {
6464
}
6565
} else {
6666
start();
67-
WireMock.configureFor("localhost", port());
67+
if (options.getHttpDisabled()) {
68+
WireMock.configureFor("https", "localhost", httpsPort());
69+
} else {
70+
WireMock.configureFor("http", "localhost", port());
71+
}
72+
6873
try {
6974
before();
7075
base.evaluate();

0 commit comments

Comments
 (0)