PlanningAnalyticsEnvironment.Builder
import io.skipcheck.tm1.testcontainers.PlanningAnalyticsEnvironment.Builder;Builds a PlanningAnalyticsEnvironment. Every part is optional.
Members
tm1 | Adds a TM1 server with an empty database. |
tm1 | Adds a TM1 server. |
adminServer | Adds a shared Admin Server, even for one TM1 server. |
adminServer | Adds a shared Admin Server. |
tm1Web | Adds TM1 Web, listing every TM1 server. |
tm1Web | Adds TM1 Web. |
paw | Adds PAW, logging users on to the first TM1 server and listing every one. |
cognos | Adds Cognos, and runs every TM1 server in CAM security against it (camSecurity). |
keycloak | Adds Keycloak, giving Cognos an OIDC namespace with the same test users. |
keycloak | Adds Keycloak. |
camSecurity | How the TM1 servers use Cognos. |
tm1Source | Where TM1 comes from; Tm1Source.discover by default. |
tm1WebSource | Where TM1 Web comes from; Tm1WebSource.discover by default. |
pawSource | Where PAW comes from; PawSource.discover by default. |
cognosSource | 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 Testcontainers reuse (testcontainers.reuse.enable=true in ~/.testcontainers.properties, or TESTCONTAINERS_REUSE_ENABLE=true). |
build | Creates the containers and wires them together. |
tm1
PlanningAnalyticsEnvironment.Builder tm1(String name)Adds a TM1 server with an empty database.
Parameters
name- its name (
ServerName), also its name on the network
Returns
- this builder
tm1
PlanningAnalyticsEnvironment.Builder tm1(String name, Consumer<Tm1ServerContainer> customizer)Adds a TM1 server.
Parameters
name- its name (
ServerName), also its name on the network: letters, digits,_and- customizer- configures the container, e.g.
withSeedorwithData
Returns
- this builder
Throws
IllegalArgumentException- if the name isn't allowed or is already used
adminServer
PlanningAnalyticsEnvironment.Builder adminServer()Adds a shared Admin Server, even for one TM1 server. With more than one, it's added anyway.
Returns
- this builder
adminServer
PlanningAnalyticsEnvironment.Builder adminServer(Consumer<Tm1AdminServerContainer> customizer)Adds a shared Admin Server.
Parameters
customizer- configures the container
Returns
- this builder
tm1Web
PlanningAnalyticsEnvironment.Builder tm1Web()Adds TM1 Web, listing every TM1 server.
Returns
- this builder
tm1Web
PlanningAnalyticsEnvironment.Builder tm1Web(Consumer<Tm1WebContainer> customizer)Adds TM1 Web.
Parameters
customizer- configures the container, e.g.
TM1_WEB_HEAP
Returns
- this builder
paw
PlanningAnalyticsEnvironment.Builder paw(Consumer<PawContainer> customizer) Adds PAW, logging users on to the first TM1 server and listing every one. IBM's
license must be accepted (PawContainer.acceptLicense in the
customizer, or PAW_ACCEPT_LICENSE=true). With cognos, users
log on to PAW through Cognos, in the CAM namespace.
Parameters
customizer- configures the container
Returns
- this builder
cognos
PlanningAnalyticsEnvironment.Builder cognos(Consumer<CognosContainer> customizer) Adds Cognos, and runs every TM1 server in CAM security against it
(camSecurity).
Parameters
customizer- configures the container, and adds its test users with
CognosContainer.withUser
Returns
- this builder
keycloak
PlanningAnalyticsEnvironment.Builder keycloak() Adds Keycloak, giving Cognos an OIDC namespace with the same test users. Needs
cognos.
Returns
- this builder
keycloak
PlanningAnalyticsEnvironment.Builder keycloak(Consumer<KeycloakContainer> customizer)Adds Keycloak.
Parameters
customizer- configures the container
Returns
- this builder
camSecurity
PlanningAnalyticsEnvironment.Builder camSecurity(CognosContainer.Namespace namespace, String... admins) How the TM1 servers use Cognos: the namespace their administrators and groups
are in, and which test users are TM1 administrators. Default:
CognosContainer.Namespace.LDAP, with the first test user as the administrator.
Parameters
namespace- the namespace (
CognosContainer.Namespace.OIDCneedskeycloak) admins- test users to make TM1 administrators; none for the first test user
Returns
- this builder
tm1Source
PlanningAnalyticsEnvironment.Builder tm1Source(Tm1Source source)tm1WebSource
PlanningAnalyticsEnvironment.Builder tm1WebSource(Tm1WebSource source) Where TM1 Web comes from; Tm1WebSource.discover by default.
Parameters
source- the source
Returns
- this builder
pawSource
PlanningAnalyticsEnvironment.Builder pawSource(PawSource source)cognosSource
PlanningAnalyticsEnvironment.Builder cognosSource(CognosSource source) Where Cognos comes from; CognosSource.discover by default.
Parameters
source- the source
Returns
- this builder
network
PlanningAnalyticsEnvironment.Builder network(Network network) The Docker network to put everything on; a new one, removed by
PlanningAnalyticsEnvironment.close, by default.
Parameters
network- the network
Returns
- this builder
reuse
PlanningAnalyticsEnvironment.Builder reuse(boolean reuse) Keeps the containers running between test runs, when you've also turned on
Testcontainers 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 finds a container by everything it's created with,
including its network's ID.
Parameters
reuse- whether to keep the containers
Returns
- this builder
build
PlanningAnalyticsEnvironment build() Creates the containers and wires them together. Nothing starts until
PlanningAnalyticsEnvironment.start.
Returns
- the environment
Throws
IllegalStateException- if a part needs one that's missing, or a source can't be found
Also in the Javadoc.