PlanningAnalyticsEnvironment.EnvironmentBuilder
using Skipcheck.Tm1.Testcontainers;Builds a PlanningAnalyticsEnvironment. Every part is optional.
Members
Tm1 | Adds a TM1 server, named name (its server name and network alias). |
Tm1 | Adds a TM1 server, and changes it with customizer once wired. |
AdminServer | Adds a shared Admin Server even for one TM1 server. |
AdminServer | Adds a shared Admin Server, changed with customizer. |
Tm1Web | Adds TM1 Web. |
Tm1Web | Adds TM1 Web, 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. |
Keycloak | Adds Keycloak, changed with customizer. |
CamSecurity | The CAM namespace 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. |
PawSource | Where PAW comes from. |
CognosSource | Where Cognos comes from. |
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). |
Build | The environment, wired. |
Tm1
EnvironmentBuilder Tm1(string name)Adds a TM1 server, named name (its server name and network alias).
Tm1
EnvironmentBuilder Tm1(string name, Action<Tm1ServerContainer> customizer)Adds a TM1 server, and changes it with customizer once wired.
Throws
ArgumentException- A bad name, or one added twice.
AdminServer
EnvironmentBuilder AdminServer()Adds a shared Admin Server even for one TM1 server.
AdminServer
EnvironmentBuilder AdminServer(Action<Tm1AdminServerContainer> customizer)Adds a shared Admin Server, changed with customizer.
Tm1Web
EnvironmentBuilder Tm1Web()Adds TM1 Web.
Tm1Web
EnvironmentBuilder Tm1Web(Action<Tm1WebContainer> customizer)Adds TM1 Web, changed with customizer.
Paw
EnvironmentBuilder Paw(Action<PawContainer> customizer)Adds PAW, changed with customizer (to accept the license, say). With Cognos, users log
on to PAW through Cognos, in the CAM namespace.
Cognos
EnvironmentBuilder Cognos(Action<CognosContainer> customizer)Adds Cognos, putting every TM1 server in CAM security; add its test users with customizer.
Keycloak
EnvironmentBuilder Keycloak()Adds Keycloak, giving Cognos an OIDC namespace.
Keycloak
EnvironmentBuilder Keycloak(Action<KeycloakContainer> customizer)Adds Keycloak, changed with customizer.
CamSecurity
EnvironmentBuilder CamSecurity(CognosContainer.Namespace @namespace, params string[] admins)The CAM namespace and the TM1 administrators (by default, the first test user).
Tm1Source
EnvironmentBuilder Tm1Source(Tm1Source source)Where TM1 comes from, rather than Tm1Source.Discover.
Tm1WebSource
EnvironmentBuilder Tm1WebSource(Tm1WebSource source)Where TM1 Web comes from.
PawSource
EnvironmentBuilder PawSource(PawSource source)Where PAW comes from.
CognosSource
EnvironmentBuilder CognosSource(CognosSource source)Where Cognos comes from.
Network
EnvironmentBuilder Network(Testcontainers.Network network)The network to use, rather than a new one (which the environment removes when it stops).
Reuse
EnvironmentBuilder Reuse(bool 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).
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: Testcontainers for
.NET finds a container by a hash that leaves its network out, so a container found would still be on the network it
was created on.
Parameters
reuse- Whether to keep the containers.
Returns
- This builder.
Build
PlanningAnalyticsEnvironment Build()The environment, wired.
Throws
InvalidOperationException- Parts are missing, or don't go together.