forked from testcontainers/testcontainers-java
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using LogMessageWaitStrategy for VncRecordingContainer (testcontainer…
- Loading branch information
Stefan Rempfer
committed
Apr 11, 2020
1 parent
21ba448
commit e911925
Showing
2 changed files
with
35 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
core/src/test/java/org/testcontainers/containers/VncRecordingContainerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.testcontainers.containers; | ||
|
||
import org.junit.After; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
import static org.assertj.core.api.AssertionsForClassTypes.assertThat; | ||
|
||
public class VncRecordingContainerTest { | ||
|
||
private GenericContainer target; | ||
|
||
@Before | ||
public void initialize() { | ||
target = new GenericContainer("selenium/standalone-chrome-debug"). | ||
withNetwork(Network.SHARED). | ||
withExposedPorts(5900); | ||
target.start(); | ||
} | ||
|
||
@Test | ||
public void verifyStartup() { | ||
try (VncRecordingContainer container = new VncRecordingContainer(target)) { | ||
container.start(); | ||
assertThat(container.isRunning()).isTrue(); | ||
} | ||
} | ||
|
||
@After | ||
public void tearDown() { | ||
target.stop(); | ||
} | ||
} |