Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/cloud/localstack/Localstack.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public void startup(LocalstackDockerConfiguration dockerConfiguration) {
public void stop() {
if (localStackContainer != null) {
localStackContainer.stop();
localStackContainer = null;
}
locked = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.junit.rules.ExpectedException;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertFalse;

public class LocalstackDockerTest {

Expand Down Expand Up @@ -52,6 +53,13 @@ public void stop() {
amazonSQS.createQueue("test-queue").getQueueUrl();
}

@Test
public void restart() {
Localstack.INSTANCE.startup(DOCKER_CONFIG);
Localstack.INSTANCE.stop();
assertFalse(Localstack.INSTANCE.isRunning());
}

@After
public void tearDown() {
Localstack.INSTANCE.stop();
Expand Down