Each crate here is a fixture for one concern, such as a service the environment runs, and any suite can depend on it by path. See Adding a feature suite for how an environment and a fixture share a contract.
These are the variables that an environment, the test runner or CI sets for
tests to read. A tmachine environment publishes its variables with
tests/tmachine/ansible/playbooks/test-env.yaml, and openshell-test-runner
passes them to the tests. To run a suite against your own deployment, set them
yourself. A fixture fails the test when a variable it needs is missing; it
never skips it. Add a row when you add a variable. The runner also sets
OPENSHELL_GATEWAY and OPENSHELL_BIN, which testkit reads; see
Running against a gateway.
| Variable | Set by | Read by | Meaning |
|---|---|---|---|
OPENSHELL_TEST_CONTAINER_ENGINE |
Every Docker and Podman base environment (playbooks/docker.yaml, podman-rootful.yaml, podman-rootless.yaml); e2e:oci-image tasks |
container-engine-support |
The command that reaches the gateway's container engine, split on whitespace, such as docker or sudo -n podman. |
OPENSHELL_TEST_PODMAN_USERNS |
<podman base>-userns-<mode> (playbooks/drivers/podman/userns.yaml) |
podman-support |
The gateway's Podman user-namespace mode: default, auto, keep-id or private. |
OPENSHELL_TEST_CDI_SCENARIOS |
<base>-cdi (playbooks/cdi.yaml) |
tests/suites/features/cdi |
The path of the document that names the CDI device kind, each scenario and the checks it expects. |
OPENSHELL_TEST_KEYCLOAK_ISSUER |
<base>-keycloak (playbooks/keycloak.yaml) |
keycloak-support |
The OIDC issuer URL of the test realm, reachable from the test process. |
OPENSHELL_TEST_KEYCLOAK_CLIENT_ID |
<base>-keycloak |
keycloak-support |
A client in that realm that allows password grants. |
OPENSHELL_TEST_KEYCLOAK_USERNAME |
<base>-keycloak |
keycloak-support |
The realm user that tests sign in as. |
OPENSHELL_TEST_KEYCLOAK_PASSWORD |
<base>-keycloak |
keycloak-support |
That user's password. |
OPENSHELL_TEST_ADDITIONAL_CA_CERT |
The additional-CA environment, which sets openshell.supervisor.network.additional_ca_bundle (added by #5729) |
host-server-support (TestCa::from_env) |
The path of the CA certificate, in PEM, that the supervisor trusts for sandbox egress. |
OPENSHELL_TEST_ADDITIONAL_CA_KEY |
The additional-CA environment | host-server-support (TestCa::from_env) |
The path of that CA's private key, in PEM, readable by the test user. Tests sign server certificates with it. |
OPENSHELL_TEST_BASE_IMAGE |
Optional; you, for example to use a mirror | testkit::base_image() |
The default sandbox image. Unset, it is nvcr.io/nvidia/base/ubuntu:24.04. |
OPENSHELL_TEST_PYTHON_IMAGE |
Optional; e2e/rust/e2e-kubernetes.sh and e2e-vm.sh set a pullable image |
testkit::python_image() |
The workload image for tests that run python3, curl, git or openssl. Unset, it is openshell/e2e-python:dev, which the tmachine installers load. |
OPENSHELL_TEST_UNSUPPORTED |
CI and e2e/support/conformance.sh derive it from tests/suites/unsupported.yaml with tasks/scripts/suite-unsupported.sh |
testkit programs | Tests the environment can't pass yet, as <test>=<issue> entries. See Unsupported tests. |
OPENSHELL_TEST_POSTGRES_URL |
tasks/scripts/run-postgres-tests.sh (mise run test:rust:postgres), or you |
openshell-server's PostgreSQL tests |
A disposable PostgreSQL database. Never point it at one a gateway uses. |
Other OPENSHELL_TEST_* names are internal test hooks and are left out on
purpose: unit-test child-process markers, the re-entry markers in
tests/support/environment.rs, Nix guest-cache settings, install.sh test
hooks and crate test settings.
When a test must listen on a port the environment picked, because the gateway
or another service is configured to call it, the environment publishes it as
OPENSHELL_TEST_<SERVICE>_PORT and the test binds that port on every IPv4
host address, for example with HttpRecorder::builder().port(port) from
host-server-support. The host servers don't listen on IPv6, so the
environment must point the caller at an IPv4 address of the test host. The
test never picks the port itself. Give each concurrent test a distinct port.