Tm1WebContainer
from skipcheck_tm1_testcontainers import Tm1WebContainer TM1 Web (IBM Planning Analytics Spreadsheet Services) in Docker, for tests, built on
the tm1-web image.
TM1 Web lists and logs on to the TM1 servers registered with an Admin Server, so it's
started against a Tm1ServerContainer with with_tm1_server. That
container's embedded Admin Server is the one TM1 Web uses. Most tests use
RequiresTm1Web, which starts one shared TM1 Web against
the shared TM1 server.
# Entering the blocks starts TM1, then TM1 Web; leaving them stops both
with Tm1ServerContainer(tm1_source).with_seed(Tm1Seed.SDATA) as tm1, Tm1WebContainer(web_source).with_tm1_server(tm1) as web:
return web.url # http://localhost:54321/tm1web/
The image contains no IBM software, so every container needs a Tm1WebSource.
TM1 Web's default heap here is 1 GB; set the image's TM1_WEB_HEAP with
with_env to change it.
Members
DEFAULT_IMAGE | The tm1-web image, without a tag. |
WEB_IMAGE | Overrides the tm1-web image (not used with PrivateImage), e.g. |
HTTP_PORT | TM1 Web's HTTP port inside the container. |
__init__ constructor | A container on the default tm1-web image (or TM1_WEB_IMAGE), getting TM1 Web from source. |
shared static | One TM1 Web for every test in this process, listing Tm1ServerContainer.shared. |
with_tm1_server | Lists the servers of this TM1 server's Admin Server, started first. |
with_admin_server | Lists the servers of a shared Admin Server instead. |
admin_server property | The Admin Server set with with_admin_server, or None if none was set. |
source property | Where TM1 Web comes from. |
tm1_server property | The TM1 server set with with_tm1_server, or None if none was set. |
url property | TM1 Web's address as seen from the host, such as http://localhost:54321/tm1web/, ending in /. |
admin_host property | The Admin Server's host, as TM1 Web's logon takes it. |
configure | Called by testcontainers before the container is created. |
container_is_started | Called once the container is up. |
DEFAULT_IMAGE
DEFAULT_IMAGE: ClassVar[str]The tm1-web image, without a tag.
WEB_IMAGE
WEB_IMAGE: ClassVar[str] Overrides the tm1-web image (not used with
PrivateImage), e.g. tm1-web:local for a local build.
Read as a system property, then an environment variable.
HTTP_PORT
HTTP_PORT: ClassVar[int]TM1 Web's HTTP port inside the container.
__init__
constructor__init__(source: Tm1WebSource, image: str | None = None) -> None A container on the default tm1-web image (or TM1_WEB_IMAGE),
getting TM1 Web from source.
with_tm1_server
with_tm1_server(tm1: Tm1ServerContainer) -> SelfLists the servers of this TM1 server's Admin Server, started first.
with_admin_server
with_admin_server(admin: Tm1AdminServerContainer) -> SelfLists the servers of a shared Admin Server instead.
admin_server
propertyadmin_server: Tm1AdminServerContainer | NoneThe Admin Server set with with_admin_server, or None if none was set.
source
propertysource: Tm1WebSourceWhere TM1 Web comes from.
tm1_server
propertytm1_server: Tm1ServerContainer | NoneThe TM1 server set with with_tm1_server, or None if none was set.
url
propertyurl: strTM1 Web's address as seen from the host, such as http://localhost:54321/tm1web/, ending in /.
admin_host
propertyadmin_host: strThe Admin Server's host, as TM1 Web's logon takes it.
configure
configure() -> NoneCalled by testcontainers before the container is created: points TM1 Web at the Admin Server it lists servers from.
container_is_started
container_is_started() -> NoneCalled once the container is up: logs where it is and what it came from.