Repository navigation
Description
User Story
As a maintainer porting the gateway-configuration and OIDC tests out of e2e/rust in parallel, I want the helpers those ports share to exist before they start, so each port doesn't write its own copy and we don't need another extraction PR like #5691.
Description
The next three ports (gateway configuration without restart, corporate proxy, OIDC) need three things in common. None of them waits on an open decision in #5297.
-
TLS for host test servers.
tests/support/host-serverserves plain HTTP only. Add a test CA and TLS servers signed by it, built onopenshell-crypto(not theopensslCLI):TestCa::new()for a CA the test owns;TestCa::from_env()for the environment's additional CA (OPENSHELL_TEST_ADDITIONAL_CA_{CERT,KEY}, both file paths), failing if either is missing. The additional-CA environment that sets them comes with test(e2e): port gateway-configuration tests that need no restart from e2e/rust to feature suites #5729;ca.leaf(&[names])for a server certificate;- a TLS variant of the HTTP recorder (the test(e2e): decide which e2e/rust tests to port and in what order #5297 plan calls these
tlsandtls_env_ca). - an option to listen on a given port, plain or TLS, with a random port as the default. test(e2e): port corporate-proxy tests from e2e/rust to features/corporate-proxy #5730's bypass upstream binds
OPENSHELL_TEST_CORPORATE_PROXY_BYPASS_PORT.
Users:
provider_readiness,stable_external_placeholdersandadditional_ca(trust checks), and the corporate-proxy TLS upstreams. -
One tmachine role for gateway settings. Test environments add gateway settings to
/etc/openshell-test/gateway-overrides.tomlin two ways today: test(conformance): run the conformance suite against a gateway that pushes configuration #5622'sconfig-push.yamledits a marked block (blockinfile), and test(e2e): port Docker and Podman driver feature tests from e2e/rust #5695'sdriver-config.yamlreplaces the file (copy). Five new environments (OIDC, OTLP, SPIFFE, additional CA, corporate proxy) need the same. Add agateway_overridesrole that takes a name and TOML content and writes a marked block. When feat(gateway): merge drop-in configs over the base file #5489 lands, only the role changes, to write agateway.d/drop-in. Move the existing writers inmainto the role:drivers/podman/userns.yaml,cdi_fixturesandopenshell_external_driver, which all replace the file today. -
The
tests/supportcontract table. The PR6 and PR7 Definitions of Done require a row for each new environment variable, but the table doesn't exist. Addtests/support/README.mdwith one row per variable that an environment, the runner or CI sets for tests to read: name, what sets it, which helper reads it, and what it means. The otherOPENSHELL_TEST_*names are internal test hooks (unit-test child markers, Nix guest-cache settings,install.shhooks, crate test settings) and are left out on purpose. Include the convention for tests that bind a port the environment chose: the environment publishesOPENSHELL_TEST_<SERVICE>_PORTand the test binds that port on every host address.
Context
- Part of test(e2e): decide which e2e/rust tests to port and in what order #5297 (retire
e2e/rust). Findings from a survey of the PR6 and PR7 legacy tests on 11-18. - Stacks on test(e2e): port network, L7 and policy-update tests from e2e/rust to conformance #5665 (PR2): the PR's base is test(e2e): port network, L7 and policy-update tests from e2e/rust to conformance #5665's branch, and the TLS server builds on its
HttpRecorder::serve. It moves tomainafter test(e2e): port network, L7 and policy-update tests from e2e/rust to conformance #5665 merges. - The ports for gateway configuration (no restart), the corporate proxy and OIDC stack on this branch and merge it in as it changes. test(e2e): port Docker and Podman driver feature tests from e2e/rust #5695 (PR5) and test(conformance): run the conformance suite against a gateway that pushes configuration #5622 switch to the role when they rebase.
- Each port owns the helpers only it needs (per-user Keycloak clients and workspace helpers in PR7, provider refresh and OTLP in PR6a, the corporate-proxy reader in PR6b).
Definition of Done
-
tests/support/host-serverserves TLS with a test-owned CA and with the environment's additional CA, with unit tests. - A
gateway_overridestmachine role exists, and the existing override writers onmainuse it. -
tests/support/README.mdlists every variable that an environment, the runner or CI sets for tests to read, says the otherOPENSHELL_TEST_*names are left out on purpose, andTESTING.mdlinks to it. - Existing E2E rows still pass.
Activity
Merge #5780's rebased head into test/5730-port-corporate-proxy-tests/…