Repository navigation
Description
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-proxyenvironment 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 sharedgateway_overridesrole:https_proxy,proxy_auth_file,proxy_ca_bundle, andno_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
- Part of test(e2e): decide which e2e/rust tests to port and in what order #5297. Stacks on test(testkit): share TLS host servers, a gateway settings role and the environment contract table #5728 (TLS host servers,
gateway_overridesrole, contract table) and uses test(e2e): port Docker and Podman driver feature tests from e2e/rust #5695's container-engine helpers. - Rows already run one test at a time, so the fixed bypass port doesn't collide. Use test(runner): apply per-family nextest config and a thread count to runner rows #5295's test groups once rows run in parallel.
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/supportcontract table. - The listed files are deleted, and every reference to them in wrapper scripts,
tasks/*.tomland nextest config is removed. -
features/corporate-proxyhas Docker and Podman rows in.github/workflows/e2e-suites.yml.
Activity