Compare commits

...

3 Commits

3 changed files with 16 additions and 1 deletions

View File

@@ -258,6 +258,7 @@ Tests can be configured using pytest options:
- `--clickhouse-version` — ClickHouse version, also used for ClickHouse Keeper (default: `25.12.5`)
- `--schema-migrator-version` — SigNoz schema migrator version (default: `v0.144.6`)
- `--with-web` — Build the frontend into the SigNoz image (required for e2e)
- `--zeus-network-alias` — Give the zeus WireMock container a fixed network alias (e.g. `--zeus-network-alias zeus`) so the SigNoz image build args are deterministic; used by CI to share one image across jobs. Don't flip it between runs of a `--reuse` environment (cached container configs would go stale).
Example:

View File

@@ -81,6 +81,12 @@ def pytest_addoption(parser: pytest.Parser):
default=False,
help="Build and run with web. Run pytest --basetemp=./tmp/ -vv --with-web src/bootstrap/setup::test_setup to setup your local dev environment with web.",
)
parser.addoption(
"--zeus-network-alias",
action="store",
default="",
help="Give the zeus WireMock container a fixed network alias (e.g. --zeus-network-alias zeus) so the signoz image build args are deterministic; used by CI to share one image across jobs. Do not flip this option between runs of a --reuse environment: cached container configs would go stale.",
)
parser.addoption(
"--sqlstore-provider",
action="store",

View File

@@ -31,8 +31,16 @@ def zeus(
def create() -> types.TestContainerDocker:
container = WireMockContainer(image="wiremock/wiremock:2.35.1-1", secure=False)
container.with_network(network)
network_alias = pytestconfig.getoption("--zeus-network-alias")
if network_alias:
container.with_network_aliases(network_alias)
container.start()
if network_alias:
container_address = network_alias
else:
container_address = container.get_wrapped_container().name
return types.TestContainerDocker(
id=container.get_wrapped_container().id,
host_configs={
@@ -42,7 +50,7 @@ def zeus(
container.get_exposed_port(8080),
)
},
container_configs={"8080": types.TestContainerUrlConfig("http", container.get_wrapped_container().name, 8080)},
container_configs={"8080": types.TestContainerUrlConfig("http", container_address, 8080)},
)
def delete(container: types.TestContainerDocker):