Tm1AdminServerContainer
import io.skipcheck.tm1.testcontainers.Tm1AdminServerContainer; A TM1 Admin Server on its own, for tests with several TM1 servers: the
tm1-server image in admin mode. TM1 servers register with it through
Tm1ServerContainer.withAdminServer, and Tm1WebContainer and
PawContainer list them all from it.
try (var admin = new Tm1AdminServerContainer(tm1Source);
var planning = new Tm1ServerContainer(tm1Source).withEnv("TM1_SERVER_NAME", "planning")
.withAdminServer(admin);
var reporting = new Tm1ServerContainer(tm1Source).withEnv("TM1_SERVER_NAME", "reporting")
.withAdminServer(admin)) {
planning.start();
reporting.start();
return admin.getRestUrl() + "Servers"; // lists planning and reporting
}
The Admin Server is part of the TM1 install, so it takes the same Tm1Source.
Other containers reach it on their shared network as tm1-admin.
Members
REST_PORT static | The Admin Server's REST port inside the container. |
NETWORK_ALIAS static | The container's name on its Docker network, which TM1 servers register with. |
Tm1AdminServerContainer constructor | An Admin Server on the default tm1-server image (or TM1_SERVER_IMAGE), from source's TM1 install. |
Tm1AdminServerContainer constructor | An Admin Server on image, which must be tm1-server or built on it. |
getSource | Where TM1 comes from. |
getRestUrl | The Admin Server's REST API as seen from the host, e.g. |
REST_PORT
staticint REST_PORTThe Admin Server's REST port inside the container.
NETWORK_ALIAS
staticString NETWORK_ALIASThe container's name on its Docker network, which TM1 servers register with.
Tm1AdminServerContainer
constructorTm1AdminServerContainer(Tm1Source source) An Admin Server on the default tm1-server image (or
TM1_SERVER_IMAGE), from source's TM1 install.
Parameters
source- where TM1 comes from
Tm1AdminServerContainer
constructorTm1AdminServerContainer(DockerImageName image, Tm1Source source) An Admin Server on image, which must be tm1-server or built on it.
Parameters
image- the image to run
source- where TM1 comes from
getSource
Tm1Source getSource()Where TM1 comes from.
Returns
- the source
getRestUrl
String getRestUrl() The Admin Server's REST API as seen from the host, e.g.
http://localhost:54321/api/v1/. Servers lists the registered TM1
servers.
Returns
- the service root, ending in
/
Also in the Javadoc.