Skip to content

Commit

Permalink
update mockserver to 5.5.1 and bind to port 1080 which is default
Browse files Browse the repository at this point in the history
in 5.5.1 they don't run container as root, so binding to 80 port
doesn't work anymore

mock-server/mockserver@6d33bd7#diff-ebacf6f6ae4ee68078bb16454b23247d
  • Loading branch information
lanwen committed Dec 31, 2018
1 parent 30b5052 commit a5a6f0e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/mockserver/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ description = "Testcontainers :: MockServer"
dependencies {
compile project(':testcontainers')

testCompile 'org.mock-server:mockserver-client-java:5.5.0'
testCompile 'org.mock-server:mockserver-client-java:5.5.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
@Slf4j
public class MockServerContainer extends GenericContainer<MockServerContainer> {

public static final String VERSION = "5.5.0";
public static final String VERSION = "5.5.1";

public static final int PORT = 80;
public static final int PORT = 1080;

public MockServerContainer() {
this(VERSION);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package org.testcontainers.containers;

import lombok.Cleanup;
import lombok.extern.slf4j.Slf4j;
import org.junit.ClassRule;
import org.junit.Test;
import org.mockserver.client.MockServerClient;
import org.testcontainers.containers.output.Slf4jLogConsumer;

import java.io.BufferedReader;
import java.io.InputStreamReader;
Expand All @@ -14,10 +16,12 @@
import static org.mockserver.model.HttpResponse.response;
import static org.rnorth.visibleassertions.VisibleAssertions.assertTrue;

@Slf4j
public class MockServerContainerTest {

@ClassRule
public static MockServerContainer mockServer = new MockServerContainer();
public static MockServerContainer mockServer = new MockServerContainer(MockServerClient.class.getPackage().getImplementationVersion())
.withLogConsumer(new Slf4jLogConsumer(log));

@Test
public void testBasicScenario() throws Exception {
Expand Down

0 comments on commit a5a6f0e

Please sign in to comment.