skipcheck

TM1 Testcontainers · Docs · Where TM1 comes from

Tm1Seed

import { Tm1Seed } from "@skipcheck/tm1-testcontainers";

Used in the walkthrough Test your code against a real TM1.

Objects the image puts into an empty database on first start (its TM1_SEED setting). The samples come from the TM1 install itself, so they're only available where the install includes them.

A server seeded with IBM's SData sample:

const source = Tm1Source.discover();
if (!source) throw new Error("Set TM1_HOME_DIR or TM1_BUNDLE_DIR");
// SData's login is admin / apple, and the server must be this version
await using server = new Tm1ServerContainer(source).withSeed(Tm1Seed.SDATA).withExpectedVersion(Tm1Version.parse("11.8.03500.6"));
await server.start();
// Declared after the server, so it's closed before the container stops
await using tm1 = Tm1Client.builder().baseUrl(server.getRestUrl()).basicAuth(server.getUsername(), server.getPassword()).build();
// SData's cubes, such as SalesCube
const cubes = await tm1.cubes.modelCubes(ODataQuery.none().select(Cube.Fields.Name)).toArray();
return cubes.map((cube) => cube.Name!);

Members

EMPTY propertyNo objects.
SDATA propertyIBM's SData sample, with the login admin / apple.
name propertyThe constant's name, as Java's name().
value propertyWhat the image calls it (package-private in Java).
username property@internal
password property@internal
values staticEvery seed, as Java's values().
toStringThe seed's name, as Java's enum constant.

EMPTY

property
static EMPTY

No objects: an empty database with the login admin and no password.

SDATA

property
static SDATA

IBM's SData sample, with the login admin / apple.

name

property
readonly name: string

The constant's name, as Java's name().

value

property
readonly value: string

What the image calls it (package-private in Java).

username

property
readonly username: string

@internal

password

property
readonly password: string

@internal

values

static
static values(): Tm1Seed[]

Every seed, as Java's values().

toString

toString(): string

The seed's name, as Java's enum constant.