PlanningAnalyticsEnvironment.Builder
import { PlanningAnalyticsEnvironment } from "@skipcheck/tm1-testcontainers";Builds a PlanningAnalyticsEnvironment. Every part is optional.
Members
tm1 | Adds a TM1 server named name (its server name and network alias), changed with customizer once wired. |
adminServer | Adds a shared Admin Server even for one TM1 server, changed with customizer. |
tm1Web | Adds TM1 Web, listing every server, changed with customizer. |
paw | Adds PAW, changed with customizer (to accept the license, say). |
cognos | Adds Cognos, putting every TM1 server in CAM security; add its test users with customizer. |
keycloak | Adds Keycloak, giving Cognos an OIDC namespace, changed with customizer. |
camSecurity | The CAM namespace TM1's users log on through, and the TM1 administrators (by default, the first test user). |
tm1Source | Where TM1 comes from, rather than Tm1Source.discover. |
tm1WebSource | Where TM1 Web comes from, rather than Tm1WebSource.discover. |
pawSource | Where PAW comes from, rather than PawSource.discover. |
cognosSource | Where Cognos comes from, rather than CognosSource.discover. |
network | The network to use, rather than a new one (which the environment removes when it stops). |
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). |
withFileSources | The sources and images read from pa-environment.yaml. |
build | The environment, wired. |
build | Builds, with the developer's reuse switch given, so tests needn't set it. |
build |
tm1
tm1(name: string, customizer: Customizer<Tm1ServerContainer> = none): thisAdds a TM1 server named name (its server name and network alias), changed with customizer once wired.
Throws
- IllegalArgumentException for a bad name, or one added twice
adminServer
adminServer(customizer: Customizer<Tm1AdminServerContainer> = none): thisAdds a shared Admin Server even for one TM1 server, changed with customizer.
tm1Web
tm1Web(customizer: Customizer<Tm1WebContainer> = none): thisAdds TM1 Web, listing every server, changed with customizer.
paw
paw(customizer: Customizer<PawContainer>): thisAdds PAW, changed with customizer (to accept the license, say). With cognos, users log on to PAW through Cognos, in the CAM namespace.
cognos
cognos(customizer: Customizer<CognosContainer>): thisAdds Cognos, putting every TM1 server in CAM security; add its test users with customizer.
keycloak
keycloak(customizer: Customizer<KeycloakContainer> = none): thisAdds Keycloak, giving Cognos an OIDC namespace, changed with customizer.
camSecurity
camSecurity(namespace: CognosContainer.Namespace, ...admins: string[]): thisThe CAM namespace TM1's users log on through, and the TM1 administrators (by default, the first test user).
tm1Source
tm1Source(source: Tm1Source): thisWhere TM1 comes from, rather than Tm1Source.discover.
tm1WebSource
tm1WebSource(source: Tm1WebSource): thisWhere TM1 Web comes from, rather than Tm1WebSource.discover.
pawSource
pawSource(source: PawSource): thisWhere PAW comes from, rather than PawSource.discover.
cognosSource
cognosSource(source: CognosSource): thisWhere Cognos comes from, rather than CognosSource.discover.
network
network(network: Network): thisThe network to use, rather than a new one (which the environment removes when it stops).
reuse
reuse(reuse: boolean): thisKeeps 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: its name is part of the environment's identity.
Parameters
reuse- whether to keep the containers
Returns
- this builder
withFileSources
withFileSources(sources: FileSources): thisThe sources and images read from pa-environment.yaml.
build
build(): PlanningAnalyticsEnvironmentThe environment, wired.
Throws
- IllegalStateException if parts are missing, or don't go together
build
build(reuseEnabled: boolean): PlanningAnalyticsEnvironmentBuilds, with the developer's reuse switch given, so tests needn't set it.
build
build(reuseEnabled: boolean = DockerHost.reuseEnabled()): PlanningAnalyticsEnvironment