skipcheck

TM1 Testcontainers · Docs · Containers

PlanningAnalyticsEnvironment.Builder

from skipcheck_tm1_testcontainers import PlanningAnalyticsEnvironment.Builder

Builds a PlanningAnalyticsEnvironment. Every part is optional.

Members

__init__ constructor
tm1A TM1 server, its network alias and server name name.
admin_serverA shared Admin Server even for one TM1 server (several always share one).
tm1_webAdds TM1 Web, listing every TM1 server.
pawAdds PAW, logging users on to the first TM1 server and listing every one.
cognosCognos, and every TM1 server in CAM security against it; add its test users here.
keycloakAdds Keycloak, giving Cognos an OIDC namespace with the same test users.
cam_securityThe namespace TM1 authenticates against, and its administrators (default.
tm1_sourceWhere TM1 comes from; Tm1Source.discover by default.
tm1_web_sourceWhere TM1 Web comes from; Tm1WebSource.discover by default.
paw_sourceWhere PAW comes from; PawSource.discover by default.
cognos_sourceWhere Cognos comes from; CognosSource.discover by default.
networkThe Docker network to put everything on; a new one, removed by PlanningAnalyticsEnvironment.close, by default.
reuseKeeps the containers running between test runs, when you've also turned on reuse (testcontainers.reuse.enable=true in ~/.testcontainers.properties, or TESTCONTAINERS_REUSE_ENABLE=true).
buildCreates the containers and wires them together.

__init__

constructor
__init__() -> None

tm1

tm1(name: str, customizer: Callable[[Tm1ServerContainer], Any] = _nothing) -> Self

A TM1 server, its network alias and server name name.

admin_server

admin_server(customizer: Callable[[Tm1AdminServerContainer], Any] = _nothing) -> Self

A shared Admin Server even for one TM1 server (several always share one).

tm1_web

tm1_web(customizer: Callable[[Tm1WebContainer], Any] = _nothing) -> Self

Adds TM1 Web, listing every TM1 server. customizer configures the container.

paw

paw(customizer: Callable[[PawContainer], Any]) -> Self

Adds PAW, logging users on to the first TM1 server and listing every one. IBM's license must be accepted (PawContainer.accept_license in the customizer, or PAW_ACCEPT_LICENSE=true). With cognos, users log on to PAW through Cognos, in the CAM namespace (cam_security).

cognos

cognos(customizer: Callable[[CognosContainer], Any]) -> Self

Cognos, and every TM1 server in CAM security against it; add its test users here.

keycloak

keycloak(customizer: Callable[[KeycloakContainer], Any] = _nothing) -> Self

Adds Keycloak, giving Cognos an OIDC namespace with the same test users. Needs cognos.

cam_security

cam_security(namespace: Namespace, *admins: str) -> Self

The namespace TM1 authenticates against, and its administrators (default: the first test user).

tm1_source

tm1_source(source: Tm1Source) -> Self

Where TM1 comes from; Tm1Source.discover by default.

tm1_web_source

tm1_web_source(source: Tm1WebSource) -> Self

Where TM1 Web comes from; Tm1WebSource.discover by default.

paw_source

paw_source(source: PawSource) -> Self

Where PAW comes from; PawSource.discover by default.

cognos_source

cognos_source(source: CognosSource) -> Self

Where Cognos comes from; CognosSource.discover by default.

network

network(network: Any) -> Self

The Docker network to put everything on; a new one, removed by PlanningAnalyticsEnvironment.close, by default.

reuse

reuse(reuse: bool) -> Self

Keeps the containers running between test runs, when you've also turned on reuse (testcontainers.reuse.enable=true in ~/.testcontainers.properties, or TESTCONTAINERS_REUSE_ENABLE=true). A later run with the same configuration finds them, and objects tests left behind are still there. Without the switch it has no effect. See PlanningAnalyticsEnvironment for what's reused and how to start clean.

With your own network, reuse only works if it's the same network each run: a container is found by everything it's created with, including its network's name.

build

build() -> PlanningAnalyticsEnvironment

Creates the containers and wires them together. Nothing starts until PlanningAnalyticsEnvironment.start. A RuntimeError if a part needs one that's missing, or a source can't be found.