-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(ors-test-scenarios): Add a one shot image builder helper function
- Loading branch information
1 parent
486697b
commit 49880ce
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
ors-test-scenarios/src/test/java/utils/OneShotImageBuilderTest.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,25 @@ | ||
package utils; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
import org.testcontainers.containers.GenericContainer; | ||
import org.testcontainers.containers.wait.strategy.ShellStrategy; | ||
|
||
import static utils.ContainerInitializer.initContainerWithSharedGraphs; | ||
|
||
/** | ||
* This test function is a helper function to build the necessary container images for the test scenarios. | ||
* Ít is supposed to used in CI. | ||
*/ | ||
class OneShotImageBuilderTest { | ||
|
||
@Test | ||
void oneShotImageBuilder() { | ||
// Cache one | ||
GenericContainer<?> containerWar = initContainerWithSharedGraphs(ContainerInitializer.ContainerTestImageBare.WAR_CONTAINER_BARE, false); | ||
containerWar.setWaitStrategy(new ShellStrategy()); | ||
containerWar.start(); | ||
Assertions.assertTrue(containerWar.isRunning()); | ||
containerWar.stop(); | ||
} | ||
} |