Package org.cardanofoundation.hydra.test
Class HydraDevNetwork
java.lang.Object
org.cardanofoundation.hydra.test.HydraDevNetwork
- All Implemented Interfaces:
AutoCloseable,org.testcontainers.lifecycle.Startable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.testcontainers.containers.GenericContainer<?>protected org.testcontainers.containers.GenericContainer<?>static final intprotected org.testcontainers.containers.GenericContainer<?>static final intprotected static final com.fasterxml.jackson.databind.ObjectMapper -
Constructor Summary
ConstructorsConstructorDescriptionHydraDevNetwork(boolean withCardanoLogging, boolean withHydraLogging, Map<String, Integer> initialFunds) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.testcontainers.containers.GenericContainer<?>createAliceHydraNode(org.testcontainers.containers.GenericContainer<?> cardanoContainer, String scriptsTxId, org.testcontainers.containers.Network network) protected org.testcontainers.containers.GenericContainer<?>createBobHydraNode(org.testcontainers.containers.GenericContainer<?> cardanoContainer, String scriptsTxId, org.testcontainers.containers.Network network) protected org.testcontainers.containers.GenericContainer<?>org.testcontainers.containers.GenericContainer<?>org.testcontainers.containers.GenericContainer<?>static StringgetHydraApiUrl(org.testcontainers.containers.GenericContainer<?> container) protected voidprotected voidseedActor(org.testcontainers.containers.GenericContainer<?> cardanoNodeContainer, String faucetAddress, String actor, int adaAmount, boolean marker) protected voidseedActors(org.testcontainers.containers.GenericContainer<?> cardanoContainer) voidstart()voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.testcontainers.lifecycle.Startable
close, getDependencies
-
Field Details
-
objectMapper
protected static final com.fasterxml.jackson.databind.ObjectMapper objectMapper -
CARDANO_REMOTE_PORT
public static final int CARDANO_REMOTE_PORT- See Also:
-
HYDRA_API_REMOTE_PORT
public static final int HYDRA_API_REMOTE_PORT- See Also:
-
cardanoContainer
protected org.testcontainers.containers.GenericContainer<?> cardanoContainer -
aliceHydraContainer
protected org.testcontainers.containers.GenericContainer<?> aliceHydraContainer -
bobHydraContainer
protected org.testcontainers.containers.GenericContainer<?> bobHydraContainer
-
-
Constructor Details
-
HydraDevNetwork
-
HydraDevNetwork
public HydraDevNetwork()
-
-
Method Details
-
getInitialFunds
-
start
public void start()- Specified by:
startin interfaceorg.testcontainers.lifecycle.Startable
-
getAliceHydraContainer
public org.testcontainers.containers.GenericContainer<?> getAliceHydraContainer() -
getBobHydraContainer
public org.testcontainers.containers.GenericContainer<?> getBobHydraContainer() -
stop
public void stop()- Specified by:
stopin interfaceorg.testcontainers.lifecycle.Startable
-
getHydraApiUrl
-
prepareDevNet
- Throws:
IOException
-
createCardanoNodeContainer
protected org.testcontainers.containers.GenericContainer<?> createCardanoNodeContainer() -
createAliceHydraNode
protected org.testcontainers.containers.GenericContainer<?> createAliceHydraNode(org.testcontainers.containers.GenericContainer<?> cardanoContainer, String scriptsTxId, org.testcontainers.containers.Network network) -
createBobHydraNode
protected org.testcontainers.containers.GenericContainer<?> createBobHydraNode(org.testcontainers.containers.GenericContainer<?> cardanoContainer, String scriptsTxId, org.testcontainers.containers.Network network) -
seedActor
protected void seedActor(org.testcontainers.containers.GenericContainer<?> cardanoNodeContainer, String faucetAddress, String actor, int adaAmount, boolean marker) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
seedActors
protected void seedActors(org.testcontainers.containers.GenericContainer<?> cardanoContainer) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-