Skip to content

test(e2e): port corporate-proxy tests from e2e/rust to features/corporate-proxy #5730

Open

Description

@matthewgrossman

User Story

As a maintainer retiring e2e/rust, I want the corporate-proxy tests on testkit, running on a fixed proxy environment, so they no longer rewrite gateway config and restart the gateway in the middle of a test.

Description

This is the corporate-proxy part of PR6 in the #5297 plan. Every legacy corporate-proxy test edits the gateway TOML and restarts the gateway. Instead, one tmachine environment runs a proxy and configures the gateway to use it, and the tests only read what the environment publishes.

Legacy test Action Destination Notes
docker_corporate_proxy::docker_corporate_proxy_routes_approved_tls_egress + trusts_ca_bundle_for_https_proxy, podman_corporate_proxy:: same two merge tests/suites/features/corporate-proxy (approved_egress_uses_authenticated_proxy) One environment config: HTTPS proxy, auth, CA, port-qualified no_proxy. Every proxied request proves CA trust. The http:// proxy scheme is no longer tested separately.
docker_corporate_proxy::docker_corporate_proxy_trusts_intercepted_destination_tls port tests/suites/features/corporate-proxy (intercepting_proxy_ca_is_trusted_by_supervisor_and_workload) Runs on every corporate-proxy row, not just Docker.
↳ Podman proxy-auth secret lifecycle (from podman_corporate_proxy) split tests/suites/drivers/podman (proxy_auth_secret_removed_with_sandbox)

Helpers and environment this PR adds

  • A <base>-corporate-proxy environment on the Docker and Podman bases. One proxy, run as a service, does Basic auth, a TLS listener and TLS interception with its own CA. Reuse the legacy Python proxy rather than adding a new one. The gateway is configured through the shared gateway_overrides role: https_proxy, proxy_auth_file, proxy_ca_bundle, and no_proxy = "host.openshell.internal:<bypass port>".
  • The environment publishes OPENSHELL_TEST_CORPORATE_PROXY_{URL,CA_CERT,BYPASS_PORT,LOG}. The test starts its own upstreams (TLS through the shared host-server TLS helpers) and reads only the proxy log lines for its own ports.
  • tests/support/corporate_proxy: CorporateProxy::from_env(), plus a reader for the proxy log (which connections went through the proxy, whether auth passed, whether TLS was intercepted).
  • container-engine: add a way to list engine secrets, for the Podman secret test.

PR8 and PR9 add Kubernetes and VM rows that publish the same variables.

Files deleted

podman_corporate_proxy.rs, docker_corporate_proxy.rs. The #5297 plan moves docker_corporate_proxy.rs's config test to an openshell-gateway crate test; if it is still in the file, move it here.

Context

Definition of Done

  • Every test in the table is ported, merged or split as listed.
  • Each new environment variable has a row in the tests/support contract table.
  • The listed files are deleted, and every reference to them in wrapper scripts, tasks/*.toml and nextest config is removed.
  • features/corporate-proxy has Docker and Podman rows in .github/workflows/e2e-suites.yml.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

topic:testingUnit, integration, regression, conformance, E2E tests, coverage, flakes, and test infrastructure.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions