Repository navigation
test(testkit): share TLS host servers, a gateway settings role and the environment contract table - #5780
Open
matthewgrossman wants to merge 8 commits into
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
This was referenced Nov 20, 2026
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…settings Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
…an empty file Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Add the authority key identifier to server certificates, which strict verifiers such as Python 3.13 require, time out TLS handshakes, report CA load failures as such, and keep test CA files in temporary directories. The contract table now names environment-chosen ports OPENSHELL_TEST_<SERVICE>_PORT, matching HttpRecorder's port option. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
matthewgrossman
force-pushed
the
test/5728-share-environment-helpers/matthewgrossman
branch
from
November 20, 2026 05:50
d1cf453 to
8005863
Compare
matthewgrossman
marked this pull request as ready for review
November 20, 2026 05:50
|
Label |
Member
Author
|
/ok to test 8005863 |
matthewgrossman
added a commit
that referenced
this pull request
Nov 20, 2026
…matthewgrossman Take #5728's side for the files it owns, and publish the bypass port as OPENSHELL_TEST_CORPORATE_PROXY_BYPASS_PORT, following its renamed OPENSHELL_TEST_<SERVICE>_PORT convention. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the helpers that the next three
e2e/rustports (#5729, #5730, #5731) share, so each port doesn't write its own copy: thetests/supportenvironment contract table, agateway_overridestmachine role, and TLS for host test servers.This PR stacks on #5665 (base:
test/5655-port-network-l7-policy/matthewgrossman), because the TLS server builds on itsHttpRecorder::serve. It moves tomainafter #5665 merges.Related Issue
Closes #5728
Part of #5281
Changes
tests/support/README.md: one row for each variable an environment, the runner or CI sets for tests to read, includingOPENSHELL_TEST_UNSUPPORTEDfrom feat(testkit): run conformance as one program and add unsupported-test entries #5755. It also says the otherOPENSHELL_TEST_*names are internal test hooks, and gives theOPENSHELL_TEST_<SERVICE>_PORTrule for ports the environment chooses (the test binds the port on every host address). The runner-setOPENSHELL_GATEWAYandOPENSHELL_BINlink to testkit's docs.TESTING.mdlinks to it.roles/gateway_overrides: takesgateway_overrides_nameandgateway_overrides_contentand writes a marked block per name in/etc/openshell-test/gateway-overrides.toml, so writers keep each other's settings.gateway_overrides_state: absentremoves one name's block and keeps the rest. Content must start with a table header. When feat(gateway): merge drop-in configs over the base file #5489 lands, only this role changes. The installers skip an empty overrides file.mainnow use the role:playbooks/drivers/podman/userns.yaml, thecdi_fixturesrole and theopenshell_external_driverrole. All three used to replace the whole file, and the external-driver role runs during install, after environment setup. The usernsdefaultmode now removes only its own block; it used to delete the whole file. test(conformance): run the conformance suite against a gateway that pushes configuration #5622 (config-push.yaml) and test(e2e): port Docker and Podman driver feature tests from e2e/rust #5695 (driver-config.yaml) switch to the role when they rebase.merge_gateway_toml_test.py: covers a file with several marked blocks, and two blocks that declare the same table, which fails.tests/support/host-serverTLS, built onopenshell-cryptoandtokio-rustls:TestCa::from_filesrejects a key that doesn't match the certificate.TestCa::new()makes a CA only the test knows.TestCa::from_env()loads the environment's additional CA from the files thatOPENSHELL_TEST_ADDITIONAL_CA_CERTandOPENSHELL_TEST_ADDITIONAL_CA_KEYname, and fails if either is unset.TestCa::from_filesandca.cert_pem()are also there.ca.leaf(&[names])returns anIdentity(certificate and key PEM). A name that parses as an IP address becomes an IP entry.HttpRecorder::serve_tls(&identity, handler)andstart_tls(&identity, body)are the TLS versions ofserveandstart. The connection code now takes any stream, so plain HTTP, TLS and the WebSocket recorder share it.HttpRecorder::builder()picks the port and TLS:.port(port)listens on a given port (a random free port stays the default), and.tls(&identity)serves TLS.start,serve,start_tlsandserve_tlsare shorthands for it. test(e2e): port corporate-proxy tests from e2e/rust to features/corporate-proxy #5730's bypass upstream bindsOPENSHELL_TEST_CORPORATE_PROXY_BYPASS_PORTthis way.Testing
uv run --with pytest pytest tests/tmachine/ansible/roles/openshell_gateway/files/merge_gateway_toml_test.py(13 passed)ansible-playbook --syntax-checkondrivers/podman/userns.yaml,cdi.yaml,openshell-deb.yamldrivers/podman/userns.yamlrun as root in a Linux container: blocks for several names coexist, re-writing a name replaces its block,defaultafterprivateremoves only the userns block,defaulton a fresh guest creates no file, and content without a table header failstest:e2e)cargo test -p host-server-support(19 passed). The new TLS tests check that a client trusting the CA gets an answer by DNS name and by IP, that another name or another CA is rejected, thatfrom_envloads CA files and fails naming the missing variable, that a chosen port is used and a taken one fails naming it, that a CA key from another CA is rejected at load time, and that server certificates carry the authority key identifier (strict verifiers such as Python 3.13+ require it)cargo fmt --checkandcargo clippy --all-targets -D warningsontests/support,tests/suites/conformanceandtests/suites/features;check_cargo_lockfile_alignment.pyChecklist