Skip to content

test: grow the integration scenario set (env_file, runtime interpolation)#44

Merged
lesnik512 merged 3 commits into
mainfrom
test/grow-integration-scenarios-env
Jul 13, 2026
Merged

test: grow the integration scenario set (env_file, runtime interpolation)#44
lesnik512 merged 3 commits into
mainfrom
test/grow-integration-scenarios-env

Conversation

@lesnik512

Copy link
Copy Markdown
Member

What

Grows the podman integration harness further (from #41, #43) with two more behavioral scenarios, per planning/changes/2026-07-13.03-grow-integration-scenarios-env.md. No harness, conftest.py, pyproject.toml, or CI config changes -- each scenario reuses the existing run_pod fixture.

  • env_file -- a real host file, resolved against project_dir, loaded into the container's actual environment via --env-file.
  • Runtime ${VAR} interpolation -- a variable set via monkeypatch.setenv just before run_pod proves the ${VAR} reference survives compose2pod's generation step as a live shell expansion (never baked into a literal): run_pod's subprocess call inherits the current process environment, so the whole chain -- generation, the outer script's own shell expansion, and podman actually setting the container's env -- gets exercised end to end.

Both underlying code paths (_add_env_flags's path resolution, and the emit.py -> keys.py -> shell.py interpolation chain) were independently traced to source during task review, not assumed -- a prior round in this series shipped a scenario with an unverified file-format assumption that only surfaced in CI, so this round's reviews were deliberately more skeptical.

Verification

just test-ci at 100% (363 passed, 8 deselected); just lint-ci and just check-planning clean. Both scenarios use busybox:1.36, already cached. Behavioral green is produced by the existing integration CI job.

…ed by the outer script

Both scenarios wrote a bare $COLOR/$TOKEN meant to be read by the CONTAINER's
own shell, but compose2pod's own ${VAR} interpolation applies uniformly to
every emitted string -- including command: list entries -- so it got
resolved by the OUTER script against ITS OWN environment instead, producing
an empty value before the command ever reached the container. Confirmed by
generating the script locally: the command rendered as "echo \"${COLOR-}\""
rather than the literal "echo \"$COLOR\"". $$ is Compose's own escape for a
literal $, verified via the same local-generation check to render correctly.
@lesnik512 lesnik512 merged commit cccd861 into main Jul 13, 2026
13 of 14 checks passed
@lesnik512 lesnik512 deleted the test/grow-integration-scenarios-env branch July 13, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant