DynamicProofServerContainer
Midnight.js API Reference v2.0.2
Midnight.js API Reference / @midnight-ntwrk/midnight-js-testing / DynamicProofServerContainer
Class: DynamicProofServerContainer
A proof server container that is started and stopped dynamically by the test suite on random port.
Implementsβ
Implementsβ
Propertiesβ
dockerEnvβ
dockerEnv:
StartedDockerComposeEnvironment
The Docker Compose environment running the container
Methodsβ
getMappedPort()β
getMappedPort():
number
Gets the mapped port number for the container.
Returnsβ
number
The mapped port number
getUrl()β
getUrl():
string
Gets the URL where the proof server can be accessed.
Returnsβ
string
The URL of the proof server
Implementation ofβ
stop()β
stop():
Promise<void>
Stops the proof server container.
Returnsβ
Promise<void>
A promise that resolves when the container is stopped
Implementation ofβ
start()β
staticstart(logger,maybeUID?,maybeNetworkId?):Promise<DynamicProofServerContainer>
Starts a new proof server container.
Parametersβ
loggerβ
Logger
Logger instance for recording operations
maybeUID?β
string
Optional unique identifier for the container
maybeNetworkId?β
string
Optional network ID for the container
Returnsβ
Promise<DynamicProofServerContainer>
A promise that resolves to the new container instance