Class TestContainers
java.lang.Object
io.micronaut.testresources.testcontainers.TestContainers
An utility class used to manage the lifecycle of test containers.
We preserve the list of open containers in-memory in a static field,
because we want them to live as long as the VM is live.
It is possible to explicitly shutdown all containers by calling
the
closeAll() method.-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancloseAll()static booleancloseScope(String id) static List<org.testcontainers.containers.GenericContainer<?>>findByRequestedProperty(Scope scope, String property) listAll()Lists all containers.listByScope(String id) static org.testcontainers.containers.Network
-
Method Details
-
listAll
Lists all containers.- Returns:
- the containers
-
listByScope
-
network
-
closeAll
public static boolean closeAll() -
getNetworks
-
closeScope
-
findByRequestedProperty
-