Skip to content

Commit

Permalink
Fix checkstyle (#1158)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikriemer committed Jan 27, 2023
1 parent bac4d45 commit 19f5250
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@

public class AbstractConsulTest {

static final ConsulContainer consulContainer;
static final ConsulContainer CONSUL_CONTAINER;

static {
consulContainer = new ConsulContainer(
CONSUL_CONTAINER = new ConsulContainer(
DockerImageName.parse("consul").withTag("1.14.3"))
.withExposedPorts(8500);
consulContainer.start();
CONSUL_CONTAINER.start();
}

protected ConfigItem makeConfigItem(String key, String value) {
Expand All @@ -57,8 +57,8 @@ protected Environment mockEnvironment() {
var consulLocationMock = mock(StringEnvironmentVariable.class);
var spDebugMock = mock(BooleanEnvironmentVariable.class);

Mockito.when(hostVariableMock.getValueOrDefault()).thenReturn(consulContainer.getHost());
Mockito.when(portVariableMock.getValueOrDefault()).thenReturn(consulContainer.getMappedPort(8500));
Mockito.when(hostVariableMock.getValueOrDefault()).thenReturn(CONSUL_CONTAINER.getHost());
Mockito.when(portVariableMock.getValueOrDefault()).thenReturn(CONSUL_CONTAINER.getMappedPort(8500));
Mockito.when(consulLocationMock.exists()).thenReturn(false);
Mockito.when(spDebugMock.exists()).thenReturn(false);
Mockito.when(spDebugMock.getValueOrReturn(false)).thenReturn(false);
Expand Down

0 comments on commit 19f5250

Please sign in to comment.