skipcheck

TM1 Testcontainers · Docs · Where TM1 comes from

Tm1EngineSource

from skipcheck_tm1_testcontainers import Tm1EngineSource

Where a Tm1EngineContainer gets TM1 v12 from.

The tm1-engine image contains no IBM software, so every container needs one of these. They mirror the image's own sources (see the image's README), and Tm1Source, which does the same for TM1 11.

discover finds one from the environment, so tests don't hard-code paths. Each setting is read first as a system property and then as an environment variable, under the same name. The first source found wins, in this order:

  1. TM1_ENGINE_PRIVATE_IMAGE: an image with TM1 built in (Tm1EngineSource.PrivateImage)
  2. TM1_ENGINE_HOME_DIR: an install the image made, as a folder (Tm1EngineSource.InstallDir)
  3. TM1_ENGINE_INSTALL_VOLUME: a Docker volume holding such an install (Tm1EngineSource.InstallVolume)
  4. TM1_ENGINE_BUNDLE_DIR, optionally with TM1_ENGINE_BUNDLE: a folder holding IBM's package, and the file name to use from it (Tm1EngineSource.Bundle)
  5. TM1_ENGINE_BUNDLE_URL, optionally with TM1_ENGINE_BUNDLE_SHA256: a download link for the package (Tm1EngineSource.BundleUrl)
  6. TM1_BUNDLE_DIR, TM1 11's downloads folder, when it holds a TM1 v12 package too: one folder then serves both versions

Members

PRIVATE_IMAGESettings read by discover, in the order they're tried.
HOME_DIRAn install the image made, as a folder, for Tm1EngineSource.InstallDir.
INSTALL_VOLUMEA Docker volume holding an install, for Tm1EngineSource.InstallVolume.
BUNDLE_DIRA folder holding IBM's package, for Tm1EngineSource.Bundle.
BUNDLEThe package's file name within BUNDLE_DIR; the newest one if unset.
BUNDLE_URLA download link for IBM's package, for Tm1EngineSource.BundleUrl.
BUNDLE_SHA256The SHA-256 to check the BUNDLE_URL download against; optional.
describeA short description for logs and messages.
discover staticThe first source set, in this order.

PRIVATE_IMAGE

PRIVATE_IMAGE: ClassVar[str]

Settings read by discover, in the order they're tried.

HOME_DIR

HOME_DIR: ClassVar[str]

An install the image made, as a folder, for Tm1EngineSource.InstallDir.

INSTALL_VOLUME

INSTALL_VOLUME: ClassVar[str]

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

BUNDLE_DIR

BUNDLE_DIR: ClassVar[str]

A folder holding IBM's package, for Tm1EngineSource.Bundle.

BUNDLE

BUNDLE: ClassVar[str]

The package's file name within BUNDLE_DIR; the newest one if unset.

BUNDLE_URL

BUNDLE_URL: ClassVar[str]

A download link for IBM's package, for Tm1EngineSource.BundleUrl.

BUNDLE_SHA256

BUNDLE_SHA256: ClassVar[str]

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

describe

describe() -> str

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

discover

static
discover(lookup: Lookup | None = None) -> Tm1EngineSource | None

The first source set, in this order: TM1_ENGINE_PRIVATE_IMAGE, TM1_ENGINE_HOME_DIR, TM1_ENGINE_INSTALL_VOLUME, TM1_ENGINE_BUNDLE_DIR (with TM1_ENGINE_BUNDLE), TM1_ENGINE_BUNDLE_URL (with TM1_ENGINE_BUNDLE_SHA256), then TM1_BUNDLE_DIR, TM1 11's downloads folder, when it holds a tm1-v*-standalone-linux.tgz too: one folder then serves both versions. None if none is.