skipcheck

TM1 Testcontainers · Docs · Where TM1 comes from

Tm1WebSource

import io.skipcheck.tm1.testcontainers.Tm1WebSource;

Where a Tm1WebContainer gets TM1 Web from.

The tm1-web image contains no IBM software, so every container needs one of these. They mirror Tm1Source, with TM1_WEB_ settings, and the image's own sources (see the image's README).

discover finds one from the environment. Each setting is read first as a system property and then as an environment variable, under the same name. The names match the tm1-server compose settings. The first source found wins, in this order:

  1. TM1_WEB_PRIVATE_IMAGE: an image with TM1 Web built in (Tm1WebSource.PrivateImage)
  2. TM1_WEB_HOME_DIR: an installed tm1web folder (Tm1WebSource.InstallDir)
  3. TM1_WEB_INSTALL_VOLUME: a Docker volume holding an install (Tm1WebSource.InstallVolume)
  4. TM1_WEB_BUNDLE_DIR, optionally with TM1_WEB_BUNDLE: a folder holding IBM's bundle, and the file name to use from it (Tm1WebSource.Bundle)
  5. TM1_WEB_BUNDLE_URL, optionally with TM1_WEB_BUNDLE_SHA256: a download link for the bundle (Tm1WebSource.BundleUrl)
  6. TM1_BUNDLE_DIR, if it also holds a TM1 Web bundle (or TM1_WEB_BUNDLE names one in it): the same downloads folder as TM1, as in the compose setup

Members

PRIVATE_IMAGE staticAn image with TM1 Web built in, for Tm1WebSource.PrivateImage.
HOME_DIR staticAn installed tm1web folder, for Tm1WebSource.InstallDir.
INSTALL_VOLUME staticA Docker volume holding an install, for Tm1WebSource.InstallVolume.
BUNDLE_DIR staticA folder holding IBM's TM1 Web bundle, for Tm1WebSource.Bundle.
BUNDLE staticThe bundle's file name within the bundle folder; the newest one if unset.
BUNDLE_URL staticA download link for IBM's TM1 Web bundle, for Tm1WebSource.BundleUrl.
BUNDLE_SHA256 staticThe SHA-256 to check the BUNDLE_URL download against; optional.
describeA short description for logs and messages.
discover staticFinds a source from system properties and environment variables.
discover staticFinds a source using lookup to read each setting.

PRIVATE_IMAGE

static
String PRIVATE_IMAGE

An image with TM1 Web built in, for Tm1WebSource.PrivateImage.

HOME_DIR

static
String HOME_DIR

An installed tm1web folder, for Tm1WebSource.InstallDir.

INSTALL_VOLUME

static
String INSTALL_VOLUME

A Docker volume holding an install, for Tm1WebSource.InstallVolume.

BUNDLE_DIR

static
String BUNDLE_DIR

A folder holding IBM's TM1 Web bundle, for Tm1WebSource.Bundle.

BUNDLE

static
String BUNDLE

The bundle's file name within the bundle folder; the newest one if unset.

BUNDLE_URL

static
String BUNDLE_URL

A download link for IBM's TM1 Web bundle, for Tm1WebSource.BundleUrl.

BUNDLE_SHA256

static
String BUNDLE_SHA256

The SHA-256 to check the BUNDLE_URL download against; optional.

describe

String describe()

A short description for logs and messages. Never includes a URL's query string.

Returns

the description

discover

static
static Optional<Tm1WebSource> discover()

Finds a source from system properties and environment variables. See the class docs.

Returns

the source, or empty if none is configured

Throws

IllegalArgumentException
if a setting is present but invalid

discover

static
static Optional<Tm1WebSource> discover(Function<String,String> lookup)

Finds a source using lookup to read each setting. Blank values count as unset.

Parameters

lookup
reads a setting by name, returning null if it's unset

Returns

the first source found, or empty if none is configured

Throws

IllegalArgumentException
if a setting is present but invalid, such as a folder that doesn't exist. A wrong setting fails rather than silently skipping the tests.

Also in the Javadoc.