skipcheck

TM1 Testcontainers · Docs · Where TM1 comes from

Tm1Seed

import io.skipcheck.tm1.testcontainers.Tm1Seed;

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:

Tm1Source source = Tm1Source.discover().orElseThrow();
// SData's login is admin / apple, and the server must be this version
try (var server = new Tm1ServerContainer(source).withSeed(Tm1Seed.SDATA)
    .withExpectedVersion(Tm1Version.parse("11.8.03500.6"))) {
    server.start();
    Tm1Client tm1 = Tm1Client.builder()
        .baseUrl(server.getRestUrl())
        .basicAuth(server.getUsername(), server.getPassword())
        .build();
    try {
        // SData's cubes, such as SalesCube
        return tm1.cubes()
            .modelCubes(ODataQuery.none().select(Cube.NAME))
            .map(Cube::name)
            .collectList()
            .block(WAIT);
    }
    finally {
        tm1.close().block(WAIT); // before the container stops
    }
}

Members

values static
valueOf static
EMPTY staticNo objects.
SDATA staticIBM's SData sample, with the login admin / apple.

values

static
static Tm1Seed[] values()

valueOf

static
static Tm1Seed valueOf(String name)

EMPTY

static
EMPTY

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

SDATA

static
SDATA

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

Also in the Javadoc.