diff --git a/README.md b/README.md index 5815631..d0041e2 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,8 @@ extended tests supported by both protocols. Each target sets its endpoint, protocol, and test config explicitly, regardless of the container defaults. The browser target runs in a pinned Playwright container, installs its node packages there, and uses the account generated when `nictool-legacy` starts. +The legacy profile opts into that account with `NICTOOL_TEST_ENV=1`; NicTool's +standalone container leaves it disabled unless requested. ## Local development diff --git a/docker-compose.yml b/docker-compose.yml index f2fe2c6..919cc57 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -149,6 +149,7 @@ services: NICTOOL_DATA_PROTOCOL: ${NICTOOL_DATA_PROTOCOL:-rest} NICTOOL_SERVER_HOST: ${NICTOOL_SERVER_HOST:-api} NICTOOL_SERVER_PORT: ${NICTOOL_SERVER_PORT:-3000} + NICTOOL_TEST_ENV: "1" healthcheck: test: ["CMD", "curl", "-fso", "/dev/null", "http://localhost/index.cgi"] interval: 10s diff --git a/tests/test_compose.py b/tests/test_compose.py index 7fe3c92..0a888c2 100644 --- a/tests/test_compose.py +++ b/tests/test_compose.py @@ -65,6 +65,11 @@ def test_legacy_waits_for_the_root_user_seed(self): "service_completed_successfully", ) + def test_legacy_profile_enables_the_generated_test_environment(self): + legacy = compose()["services"]["nictool-legacy"] + + self.assertEqual(legacy["environment"]["NICTOOL_TEST_ENV"], "1") + def test_browser_runner_stays_out_of_the_all_profile(self): self.assertEqual(compose()["services"]["v2-e2e"]["profiles"], ["test"])