Skip to content

Commit

Permalink
test(ors-test-scenarios): Add a one shot image builder helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelsJP committed Nov 12, 2024
1 parent 486697b commit 49880ce
Showing 1 changed file with 25 additions and 0 deletions.
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();
}
}

0 comments on commit 49880ce

Please sign in to comment.