skipcheck

TM1 Testcontainers · Docs · Containers

Tm1AdminServerContainer

from skipcheck_tm1_testcontainers import 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.with_admin_server, and Tm1WebContainer and PawContainer list them all from it.

with Tm1AdminServerContainer(tm1_source) as admin:
    planning = Tm1ServerContainer(tm1_source).with_env("TM1_SERVER_NAME", "planning").with_admin_server(admin)
    reporting = Tm1ServerContainer(tm1_source).with_env("TM1_SERVER_NAME", "reporting").with_admin_server(admin)
    with planning, reporting:
        return admin.rest_url + "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_PORTThe Admin Server's REST port inside the container.
NETWORK_ALIASThe container's name on its Docker network, which TM1 servers register with.
__init__ constructorAn Admin Server on the default tm1-server image (or TM1_SERVER_IMAGE), from source's TM1 install.
source propertyWhere TM1 comes from.
rest_url propertyThe Admin Server's REST API as seen from the host, such as http://localhost:54321/api/v1/, ending in /.
container_is_startedCalled once the container is up.

REST_PORT

REST_PORT: ClassVar[int]

The Admin Server's REST port inside the container.

NETWORK_ALIAS

NETWORK_ALIAS: ClassVar[str]

The container's name on its Docker network, which TM1 servers register with.

__init__

constructor
__init__(source: Tm1Source, image: str | None = None) -> None

An Admin Server on the default tm1-server image (or TM1_SERVER_IMAGE), from source's TM1 install.

source

property
source: Tm1Source

Where TM1 comes from.

rest_url

property
rest_url: str

The Admin Server's REST API as seen from the host, such as http://localhost:54321/api/v1/, ending in /. Servers lists the registered TM1 servers.

container_is_started

container_is_started() -> None

Called once the container is up: logs where it is and what it came from.