Skip to content

test: add --env-all integration tests #1042

@Mossaka

Description

@Mossaka

Parent Issue

Part of #1039

Problem

The `--env-all` flag is the primary production mode — used by `gh-aw`'s `BuildAWFArgs()` to pass all GitHub Actions environment variables into the container. The `environment-variables.test.ts` file header mentions it, but no test uses `envAll: true`.

Acceptance Criteria

  • Add `envAll` option to `AwfRunner` in `tests/fixtures/awf-runner.ts` (maps to `--env-all` CLI flag)
  • Add integration tests in `tests/integration/environment-variables.test.ts` covering:
    • `--env-all` passes host environment variables into the container
    • Proxy env vars (`HTTP_PROXY`, `HTTPS_PROXY`) are correctly set inside the container
    • `JAVA_TOOL_OPTIONS` is set with JVM proxy properties
    • Sensitive tokens (if set) are still subject to token-unsetting behavior
  • Verify `--env-all` interacts correctly with `-e` (explicit env vars)

References

  • `src/cli.ts` line 699: `--env-all` flag definition
  • `src/docker-manager.ts`: How env vars are passed to containers
  • `tests/integration/environment-variables.test.ts`: Existing env var tests to extend

Closes #1039 (when combined with other sub-issues)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions