PlanningAnalyticsEnvironment.Builder
from skipcheck_tm1_testcontainers import PlanningAnalyticsEnvironment.BuilderBuilds a PlanningAnalyticsEnvironment. Every part is optional.
Members
__init__ constructor | |
tm1 | A TM1 server, its network alias and server name name. |
admin_server | A shared Admin Server even for one TM1 server (several always share one). |
tm1_web | Adds TM1 Web, listing every TM1 server. |
paw | Adds PAW, logging users on to the first TM1 server and listing every one. |
cognos | Cognos, and every TM1 server in CAM security against it; add its test users here. |
keycloak | Adds Keycloak, giving Cognos an OIDC namespace with the same test users. |
cam_security | The namespace TM1 authenticates against, and its administrators (default. |
tm1_source | Where TM1 comes from; Tm1Source.discover by default. |
tm1_web_source | Where TM1 Web comes from; Tm1WebSource.discover by default. |
paw_source | Where PAW comes from; PawSource.discover by default. |
cognos_source | Where Cognos comes from; CognosSource.discover by default. |
network | The Docker network to put everything on; a new one, removed by PlanningAnalyticsEnvironment.close, by default. |
reuse | 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). |
build | Creates the containers and wires them together. |
__init__
constructor__init__() -> Nonetm1
tm1(name: str, customizer: Callable[[Tm1ServerContainer], Any] = _nothing) -> SelfA TM1 server, its network alias and server name name.
admin_server
admin_server(customizer: Callable[[Tm1AdminServerContainer], Any] = _nothing) -> SelfA shared Admin Server even for one TM1 server (several always share one).
tm1_web
tm1_web(customizer: Callable[[Tm1WebContainer], Any] = _nothing) -> SelfAdds TM1 Web, listing every TM1 server. customizer configures the container.
paw
paw(customizer: Callable[[PawContainer], Any]) -> SelfAdds 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]) -> SelfCognos, and every TM1 server in CAM security against it; add its test users here.
keycloak
keycloak(customizer: Callable[[KeycloakContainer], Any] = _nothing) -> SelfAdds Keycloak, giving Cognos an OIDC namespace with the same test users. Needs cognos.
cam_security
cam_security(namespace: Namespace, *admins: str) -> SelfThe namespace TM1 authenticates against, and its administrators (default: the first test user).
tm1_source
tm1_source(source: Tm1Source) -> SelfWhere TM1 comes from; Tm1Source.discover by default.
tm1_web_source
tm1_web_source(source: Tm1WebSource) -> SelfWhere TM1 Web comes from; Tm1WebSource.discover by default.
paw_source
paw_source(source: PawSource) -> SelfWhere PAW comes from; PawSource.discover by default.
cognos_source
cognos_source(source: CognosSource) -> SelfWhere Cognos comes from; CognosSource.discover by default.
network
network(network: Any) -> SelfThe Docker network to put everything on; a new one, removed by PlanningAnalyticsEnvironment.close, by default.
reuse
reuse(reuse: bool) -> SelfKeeps 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() -> PlanningAnalyticsEnvironmentCreates 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.