Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .github/workflows/branch-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -572,22 +572,6 @@ jobs:
suite-matrix: >-
[{"suite":"ci","runner":"ubuntu-26.04","podman_major":"5","podman_package_version":"5.7.0+ds2-3build1","conmon_package_version":"2.1.13+ds1-2","cmd":"mise run --no-deps --skip-deps e2e:podman:ci"}]

podman-additional-ca-e2e:
needs: [pr_metadata, build-binaries-linux, build-conformance, build-images]
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
permissions:
actions: read
contents: read
packages: read
uses: ./.github/workflows/e2e-podman-test.yml
with:
checkout-ref: ${{ needs.pr_metadata.outputs.sha }}
prebuilt-conformance: true
image-tag: ${{ needs.pr_metadata.outputs.sha }}
external-driver-binary: openshell-driver-podman
suite-matrix: >-
[{"suite":"additional-ca","runner":"ubuntu-26.04","podman_major":"5","podman_package_version":"5.7.0+ds2-3build1","conmon_package_version":"2.1.13+ds1-2","cmd":"OPENSHELL_E2E_PODMAN_TEST=additional_ca mise run --no-deps --skip-deps e2e:podman"}]

vm-e2e:
needs: [pr_metadata, build-binaries-linux, build-conformance, build-vm-driver-linux]
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
Expand Down Expand Up @@ -826,7 +810,6 @@ jobs:
- podman-e2e-integration
- docker-e2e
- podman-e2e
- podman-additional-ca-e2e
- vm-e2e
- vm-additional-ca-e2e
- podman-external-driver-e2e
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ on:
required: false
type: string
default: >-
[{"suite":"oidc-pkce-docker","cmd":"mise run --no-deps --skip-deps e2e:oidc-pkce:docker","apt_packages":"openssh-client","mcp":false},{"suite":"rust-docker","cmd":"mise run --no-deps --skip-deps e2e:rust","apt_packages":"openssh-client","mcp":false},{"suite":"oci-image","cmd":"mise run --no-deps --skip-deps e2e:oci-image","apt_packages":"openssh-client","mcp":false},{"suite":"additional-ca","cmd":"OPENSHELL_E2E_DOCKER_TEST=additional_ca mise run --no-deps --skip-deps e2e:docker","apt_packages":"openssh-client","mcp":false},{"suite":"mcp","cmd":"mise run --no-deps --skip-deps e2e:mcp","apt_packages":"","mcp":true}]
[{"suite":"oidc-pkce-docker","cmd":"mise run --no-deps --skip-deps e2e:oidc-pkce:docker","apt_packages":"openssh-client","mcp":false},{"suite":"rust-docker","cmd":"mise run --no-deps --skip-deps e2e:rust","apt_packages":"openssh-client","mcp":false},{"suite":"oci-image","cmd":"mise run --no-deps --skip-deps e2e:oci-image","apt_packages":"openssh-client","mcp":false},{"suite":"mcp","cmd":"mise run --no-deps --skip-deps e2e:mcp","apt_packages":"","mcp":true}]

permissions:
actions: read
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/e2e-suites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ jobs:
{"environment":"ubuntu-docker-rootful-corporate-proxy","installer":"deb","family":"features","package":"corporate-proxy","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"fedora-podman-rootful-corporate-proxy","installer":"rpm","family":"features","package":"corporate-proxy","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"fedora-podman-rootless-corporate-proxy","installer":"rpm","family":"features","package":"corporate-proxy","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"ubuntu-docker-rootful-additional-ca","installer":"deb","family":"features","package":"additional-ca","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"fedora-podman-rootful-additional-ca","installer":"rpm","family":"features","package":"additional-ca","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"fedora-podman-rootless-additional-ca","installer":"rpm","family":"features","package":"additional-ca","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"ubuntu-docker-rootful-keycloak","installer":"deb","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"gateway-mtls","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"ubuntu-docker-rootful-oidc","installer":"deb","family":"features","package":"oidc-auth","gateway":"openshell","runner":"ubuntu-24.04"},
Expand Down Expand Up @@ -145,7 +148,7 @@ jobs:
{"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"service-exposure","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"fedora-podman-rootful-keycloak","installer":"rpm","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"fedora-podman-rootless-keycloak","installer":"rpm","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"ubuntu-docker-rootful","installer":"deb","family":"drivers/docker","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"ubuntu-docker-rootful-additional-ca","installer":"deb","family":"drivers/docker","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"fedora-podman-rootful-userns-default","installer":"rpm","family":"drivers/podman","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"fedora-podman-rootful-userns-auto","installer":"rpm","family":"drivers/podman","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"fedora-podman-rootful-userns-keep-id","installer":"rpm","family":"drivers/podman","gateway":"openshell","runner":"ubuntu-24.04"},
Expand Down
12 changes: 10 additions & 2 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ nix run .#openshell-test-runner -- run \
nix run .#openshell-test-runner -- run \
--environment fedora-podman-rootful-userns-default --installer rpm \
--family drivers/podman

nix run .#openshell-test-runner -- run \
--environment ubuntu-docker-rootful-additional-ca --installer deb \
--family drivers/docker
```

Results and logs go to `artifacts/test-results/` by default. See
Expand Down Expand Up @@ -459,6 +463,10 @@ nix run .#openshell-test-runner -- run \
--family continuity --disruption gateway-restart
```

tmachine doesn't run the VM driver yet (#5918), so `mise run e2e:vm` runs the
`seed` tests, restarts its gateway, and runs the `verify` tests itself. It sets
`OPENSHELL_TEST_VM_STATE_DIR` for checks on the VM driver's state.

The `upgrade` disruption installs the candidate over a released package. Use the
`deb-upgrade-source` installer, or `rpm-upgrade-source` on `fedora-podman-rootless` or
`fedora-podman-rootful`, which installs the latest release as the baseline.
Expand Down Expand Up @@ -563,7 +571,7 @@ Suites:
- Driver suites (`--features e2e-docker`, `e2e-podman`, `e2e-kubernetes`, or
`e2e-vm`) - conformance plus the common and driver-specific coverage for
the selected deployment.
- Docker suite (`--features e2e-docker`) - includes Docker-only coverage such as Dockerfile image builds, Docker preflight checks, and managed Docker gateway start.
- Docker suite (`--features e2e-docker`) - includes Docker-only coverage such as Dockerfile image builds and Docker preflight checks.
- Docker GPU suite (`--features e2e-docker-gpu`) - Docker suite plus GPU sandbox smoke coverage.
- VM suite (`--features e2e-vm`) - runs e2e tests on a VM.
- Kubernetes credential-driver suite (`--features e2e-kubernetes-credential-drivers`) - targeted Kubernetes Secrets and Vault provider credential storage coverage.
Expand Down Expand Up @@ -1010,7 +1018,7 @@ cargo test --manifest-path e2e/rust/Cargo.toml --features e2e --test sync
Run a single Docker-only test directly with cargo:

```shell
cargo test --manifest-path e2e/rust/Cargo.toml --features e2e-docker --test gateway_start
cargo test --manifest-path e2e/rust/Cargo.toml --features e2e-docker --test provider_readiness
```

The harness (`e2e/rust/src/harness/`) provides:
Expand Down
20 changes: 0 additions & 20 deletions e2e/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,11 @@ name = "additional_ca"
path = "tests/additional_ca.rs"
required-features = ["e2e-additional-ca"]

[[test]]
name = "gateway_start"
path = "tests/gateway_start.rs"
required-features = ["e2e-docker"]

[[test]]
name = "local_driver_token_restart"
path = "tests/local_driver_token_restart.rs"
required-features = ["e2e"]

[[test]]
name = "ephemeral_cleanup"
path = "tests/ephemeral_cleanup.rs"
required-features = ["e2e"]

[[test]]
name = "podman_gateway_start"
path = "tests/podman_gateway_start.rs"
required-features = ["e2e-podman"]

[[test]]
name = "provider_refresh_handles"
path = "tests/provider_refresh_handles.rs"
Expand All @@ -116,11 +101,6 @@ name = "provider_readiness"
path = "tests/provider_readiness.rs"
required-features = ["e2e-docker"]

[[test]]
name = "vm_gateway_start"
path = "tests/vm_gateway_start.rs"
required-features = ["e2e-vm"]

[[test]]
name = "vm_corporate_proxy"
path = "tests/vm_corporate_proxy.rs"
Expand Down
5 changes: 0 additions & 5 deletions e2e/rust/e2e-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ RUN_WITH_GATEWAY_COMMAND="__openshell_run_docker_e2e"
# shellcheck source=e2e/support/conformance.sh
source "${ROOT}/e2e/support/conformance.sh"

if [ "${E2E_TEST}" = "additional_ca" ]; then
export OPENSHELL_E2E_ADDITIONAL_CA=1
E2E_FEATURES="${E2E_FEATURES},e2e-additional-ca"
fi

run_e2e() {
e2e_run_openshell_conformance "Docker"

Expand Down
6 changes: 0 additions & 6 deletions e2e/rust/e2e-podman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ source "${ROOT}/e2e/support/conformance.sh"
PODMAN_CI_TESTS=(
ephemeral_cleanup
edge_tunnel_e2e
podman_gateway_start
provider_github_app
)

Expand All @@ -50,11 +49,6 @@ if [ -n "${E2E_TEST}" ]; then
SELECTED_TESTS=("${E2E_TEST}")
fi

if [ "${E2E_TEST}" = "additional_ca" ]; then
export OPENSHELL_E2E_ADDITIONAL_CA=1
E2E_FEATURES="${E2E_FEATURES},e2e-additional-ca"
fi

if [ "${E2E_TEST}" = "gpu" ] && [ -z "${OPENSHELL_E2E_WORKLOAD_MANIFEST:-}" ] && [ ! -f "${DEFAULT_WORKLOAD_MANIFEST}" ]; then
echo "note: running Podman GPU e2e without a workload manifest; workload validation will log an explicit skip. Build one with 'CONTAINER_ENGINE=podman mise run e2e:workloads:build' or set OPENSHELL_E2E_WORKLOAD_MANIFEST."
fi
Expand Down
78 changes: 54 additions & 24 deletions e2e/rust/e2e-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
source "${ROOT}/e2e/support/gateway-common.sh"
# shellcheck source=e2e/support/conformance.sh
source "${ROOT}/e2e/support/conformance.sh"
# shellcheck source=e2e/support/continuity.sh
source "${ROOT}/e2e/support/continuity.sh"

COMPRESSED_DIR="${ROOT}/target/vm-runtime-compressed"
GATEWAY_BIN="${OPENSHELL_GATEWAY_BIN:-${ROOT}/target/debug/openshell-gateway}"
Expand Down Expand Up @@ -371,10 +373,13 @@ GATEWAY_ARGS=(
)
e2e_write_gateway_args_file "${GATEWAY_ARGS_FILE}" "${GATEWAY_ARGS[@]}"

"${GATEWAY_BIN}" "${GATEWAY_ARGS[@]}" \
>"${GATEWAY_LOG}" 2>&1 &
GATEWAY_PID=$!
printf '%s\n' "${GATEWAY_PID}" >"${GATEWAY_PID_FILE}"
start_gateway() {
"${GATEWAY_BIN}" "${GATEWAY_ARGS[@]}" \
>>"${GATEWAY_LOG}" 2>&1 &
GATEWAY_PID=$!
printf '%s\n' "${GATEWAY_PID}" >"${GATEWAY_PID_FILE}"
}
start_gateway

# Register the gateway before polling so readiness exercises the same mTLS
# client path as the smoke tests.
Expand All @@ -393,25 +398,25 @@ export OPENSHELL_GATEWAY_ENDPOINT="${CLI_GATEWAY_ENDPOINT}"
# particular gateway log message. The VM driver is spawned eagerly, while
# sandboxes are created on demand.

echo "==> Waiting for gateway readiness (timeout ${GATEWAY_READY_TIMEOUT}s)"
elapsed=0
last_status_output=""
while [ "${elapsed}" -lt "${GATEWAY_READY_TIMEOUT}" ]; do
if ! kill -0 "${GATEWAY_PID}" 2>/dev/null; then
echo "ERROR: openshell-gateway exited before becoming ready"
exit 1
fi
if last_status_output="$("${CLI_BIN}" status --output json 2>&1)" &&
printf '%s\n' "${last_status_output}" |
grep -Eq '"status"[[:space:]]*:[[:space:]]*"connected"'; then
echo "==> Gateway ready after ${elapsed}s"
break
fi
sleep 2
elapsed=$((elapsed + 2))
done
wait_for_gateway() {
echo "==> Waiting for gateway readiness (timeout ${GATEWAY_READY_TIMEOUT}s)"
local elapsed=0
local last_status_output=""
while [ "${elapsed}" -lt "${GATEWAY_READY_TIMEOUT}" ]; do
if ! kill -0 "${GATEWAY_PID}" 2>/dev/null; then
echo "ERROR: openshell-gateway exited before becoming ready"
exit 1
fi
if last_status_output="$("${CLI_BIN}" status --output json 2>&1)" &&
printf '%s\n' "${last_status_output}" |
grep -Eq '"status"[[:space:]]*:[[:space:]]*"connected"'; then
echo "==> Gateway ready after ${elapsed}s"
return
fi
sleep 2
elapsed=$((elapsed + 2))
done

if [ "${elapsed}" -ge "${GATEWAY_READY_TIMEOUT}" ]; then
echo "ERROR: openshell-gateway did not become ready after ${GATEWAY_READY_TIMEOUT}s"
echo "=== last openshell status output ==="
if [ -n "${last_status_output}" ]; then
Expand All @@ -421,7 +426,8 @@ if [ "${elapsed}" -ge "${GATEWAY_READY_TIMEOUT}" ]; then
fi
echo "=== end openshell status output ==="
exit 1
fi
}
wait_for_gateway

# ── Run the smoke test ───────────────────────────────────────────────
#
Expand Down Expand Up @@ -465,6 +471,19 @@ export OPENSHELL_PROVISION_TIMEOUT="${SANDBOX_PROVISION_TIMEOUT}"

OPENSHELL_TEST_PYTHON_IMAGE="${OPENSHELL_TEST_PYTHON_IMAGE:-${E2E_PULLABLE_PYTHON_IMAGE}}" \
e2e_run_openshell_conformance "VM"
if [ "${ADDITIONAL_CA_MODE}" = "1" ]; then
# The additional-ca feature suite signs its server's certificate with the
# fixture's CA, which the gateway trusts.
echo "==> Running the additional-ca feature suite"
OPENSHELL_TEST_PYTHON_IMAGE="${OPENSHELL_TEST_PYTHON_IMAGE:-${E2E_PULLABLE_PYTHON_IMAGE}}" \
OPENSHELL_TEST_ADDITIONAL_CA_CERT="${ADDITIONAL_CA_DIR}/ca.crt" \
OPENSHELL_TEST_ADDITIONAL_CA_KEY="${ADDITIONAL_CA_DIR}/ca.key" \
cargo-nextest nextest run --locked \
--manifest-path "${ROOT}/tests/suites/features/Cargo.toml" \
--package additional-ca \
--config-file "${ROOT}/tests/runner/src/program-nextest.toml" \
--profile openshell --no-tests fail
fi
if [ "${E2E_FEATURES}" = "e2e-conformance-only" ]; then
echo "::notice::Skipping Rust e2e tests (e2e-conformance-only)"
exit 0
Expand Down Expand Up @@ -496,6 +515,17 @@ else
run_e2e_test ephemeral_cleanup
run_e2e_test vm_overlay
run_e2e_test vm_bind_mount
run_e2e_test vm_gateway_start
run_e2e_test vm_corporate_proxy

# The continuity suite's seed and verify tests, with a gateway restart
# between them, as tmachine's gateway-restart disruption does (#5918).
CONTINUITY_RUN_ID="$(printf '%x' "$(date +%s)")"
export CONTINUITY_RUN_ID
export OPENSHELL_TEST_VM_STATE_DIR="${RUN_STATE_DIR}"
e2e_run_continuity_phase seed
echo "==> Restarting openshell-gateway"
e2e_stop_gateway "${GATEWAY_PID}" "${GATEWAY_PID_FILE}"
start_gateway
wait_for_gateway
e2e_run_continuity_phase verify
fi
Loading
Loading