skipcheck

TM1 Testcontainers · Docs · Containers

PlanningAnalyticsEnvironment.EnvironmentBuilder

using Skipcheck.Tm1.Testcontainers;

Builds a PlanningAnalyticsEnvironment. Every part is optional.

Members

Tm1Adds a TM1 server, named name (its server name and network alias).
Tm1Adds a TM1 server, and changes it with customizer once wired.
AdminServerAdds a shared Admin Server even for one TM1 server.
AdminServerAdds a shared Admin Server, changed with customizer.
Tm1WebAdds TM1 Web.
Tm1WebAdds TM1 Web, changed with customizer.
PawAdds PAW, changed with customizer (to accept the license, say).
CognosAdds Cognos, putting every TM1 server in CAM security; add its test users with customizer.
KeycloakAdds Keycloak, giving Cognos an OIDC namespace.
KeycloakAdds Keycloak, changed with customizer.
CamSecurityThe CAM namespace and the TM1 administrators (by default, the first test user).
Tm1SourceWhere TM1 comes from, rather than Tm1Source.Discover.
Tm1WebSourceWhere TM1 Web comes from.
PawSourceWhere PAW comes from.
CognosSourceWhere Cognos comes from.
NetworkThe network to use, rather than a new one (which the environment removes when it stops).
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).
BuildThe 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.