Tm1WebSource
import { Tm1WebSource } from "@skipcheck/tm1-testcontainers"; 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:
TM1_WEB_PRIVATE_IMAGE: an image with TM1 Web built in (PrivateImage)TM1_WEB_HOME_DIR: an installedtm1webfolder (InstallDir)TM1_WEB_INSTALL_VOLUME: a Docker volume holding an install (InstallVolume)TM1_WEB_BUNDLE_DIR, optionally withTM1_WEB_BUNDLE: a folder holding IBM's bundle, and the file name to use from it (Bundle)TM1_WEB_BUNDLE_URL, optionally withTM1_WEB_BUNDLE_SHA256: a download link for the bundle (BundleUrl)TM1_BUNDLE_DIR, if it also holds a TM1 Web bundle (orTM1_WEB_BUNDLEnames one in it): the same downloads folder as TM1, as in the compose setup
Members
PRIVATE_IMAGE property | Settings read by Tm1WebSource.discover, in the order they're tried. |
HOME_DIR property | An installed tm1web folder, for Tm1WebSource.InstallDir. |
INSTALL_VOLUME property | A Docker volume holding an install, for Tm1WebSource.InstallVolume. |
BUNDLE_DIR property | A folder holding IBM's bundle, for Tm1WebSource.Bundle. |
BUNDLE property | The bundle's file name within Tm1WebSource.BUNDLE_DIR; the newest one if unset. |
BUNDLE_URL property | A download link for IBM's bundle, for Tm1WebSource.BundleUrl. |
BUNDLE_SHA256 property | The SHA-256 to check the Tm1WebSource.BUNDLE_URL download against; optional. |
describe | A short description for logs and messages. |
toString | The description (describe), for logs. |
[inspect.custom] | As toString. |
discover static | Finds a source using lookup to read each setting (environment variables by default). |
PRIVATE_IMAGE
propertystatic PRIVATE_IMAGESettings read by Tm1WebSource.discover, in the order they're tried.
HOME_DIR
propertystatic HOME_DIRAn installed tm1web folder, for Tm1WebSource.InstallDir.
INSTALL_VOLUME
propertystatic INSTALL_VOLUMEA Docker volume holding an install, for Tm1WebSource.InstallVolume.
BUNDLE_DIR
propertystatic BUNDLE_DIRA folder holding IBM's bundle, for Tm1WebSource.Bundle.
BUNDLE
propertystatic BUNDLEThe bundle's file name within Tm1WebSource.BUNDLE_DIR; the newest one if unset.
BUNDLE_URL
propertystatic BUNDLE_URLA download link for IBM's bundle, for Tm1WebSource.BundleUrl.
BUNDLE_SHA256
propertystatic BUNDLE_SHA256The SHA-256 to check the Tm1WebSource.BUNDLE_URL download against; optional.
describe
describe(): stringA short description for logs and messages. Never includes a URL's query string.
toString
toString(): stringThe description (describe), for logs.
[inspect.custom]
[inspect.custom](): stringAs toString: console.log never shows a URL's secrets either.
discover
staticstatic discover(lookup: Lookup = Settings.get): Tm1WebSource | undefinedFinds a source using lookup to read each setting (environment variables by default). Blank values count as unset.
Returns
- the first source found, or
undefinedif 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.