Skip to content

Commit c41046c

Browse files
refactor(tests): name driver suites after the driver
Rename the Podman driver suite package from podman-driver to podman, so the tests/suites/drivers/<driver> path, cargo -p and the runner's --package value match. Its support crate took that name, so give the support crates a -support suffix: container-engine-support, keycloak-support and podman-support. Their directories under tests/support are unchanged. Update the dependents, the lockfiles, the e2e-suites matrix rows and TESTING.md, which now states both naming rules. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
1 parent 988d5c3 commit c41046c

16 files changed

Lines changed: 50 additions & 50 deletions

File tree

‎.github/workflows/e2e-suites.yml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ jobs:
7575
{"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"oci-image","gateway":"openshell","runner":"ubuntu-24.04"},
7676
{"environment":"fedora-podman-rootful-keycloak","installer":"rpm","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"},
7777
{"environment":"fedora-podman-rootless-keycloak","installer":"rpm","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"},
78-
{"environment":"fedora-podman-rootful-userns-default","installer":"binaries","family":"drivers","package":"podman-driver","gateway":"tmachine","runner":"ubuntu-24.04"},
79-
{"environment":"fedora-podman-rootful-userns-auto","installer":"binaries","family":"drivers","package":"podman-driver","gateway":"tmachine","runner":"ubuntu-24.04"},
80-
{"environment":"fedora-podman-rootful-userns-keep-id","installer":"binaries","family":"drivers","package":"podman-driver","gateway":"tmachine","runner":"ubuntu-24.04"},
81-
{"environment":"fedora-podman-rootful-userns-private","installer":"binaries","family":"drivers","package":"podman-driver","gateway":"tmachine","runner":"ubuntu-24.04"},
82-
{"environment":"fedora-podman-rootless-userns-default","installer":"binaries","family":"drivers","package":"podman-driver","gateway":"tmachine","runner":"ubuntu-24.04"},
83-
{"environment":"fedora-podman-rootless-userns-auto","installer":"binaries","family":"drivers","package":"podman-driver","gateway":"tmachine","runner":"ubuntu-24.04"},
84-
{"environment":"fedora-podman-rootless-userns-keep-id","installer":"binaries","family":"drivers","package":"podman-driver","gateway":"tmachine","runner":"ubuntu-24.04"},
85-
{"environment":"fedora-podman-rootless-userns-private","installer":"binaries","family":"drivers","package":"podman-driver","gateway":"tmachine","runner":"ubuntu-24.04"}
78+
{"environment":"fedora-podman-rootful-userns-default","installer":"binaries","family":"drivers","package":"podman","gateway":"tmachine","runner":"ubuntu-24.04"},
79+
{"environment":"fedora-podman-rootful-userns-auto","installer":"binaries","family":"drivers","package":"podman","gateway":"tmachine","runner":"ubuntu-24.04"},
80+
{"environment":"fedora-podman-rootful-userns-keep-id","installer":"binaries","family":"drivers","package":"podman","gateway":"tmachine","runner":"ubuntu-24.04"},
81+
{"environment":"fedora-podman-rootful-userns-private","installer":"binaries","family":"drivers","package":"podman","gateway":"tmachine","runner":"ubuntu-24.04"},
82+
{"environment":"fedora-podman-rootless-userns-default","installer":"binaries","family":"drivers","package":"podman","gateway":"tmachine","runner":"ubuntu-24.04"},
83+
{"environment":"fedora-podman-rootless-userns-auto","installer":"binaries","family":"drivers","package":"podman","gateway":"tmachine","runner":"ubuntu-24.04"},
84+
{"environment":"fedora-podman-rootless-userns-keep-id","installer":"binaries","family":"drivers","package":"podman","gateway":"tmachine","runner":"ubuntu-24.04"},
85+
{"environment":"fedora-podman-rootless-userns-private","installer":"binaries","family":"drivers","package":"podman","gateway":"tmachine","runner":"ubuntu-24.04"}
8686
]'
8787
matrix=$(jq -c --arg family "${FAMILY}" \
8888
'{include: map(select($family == "" or .family == $family))}' <<< "$rows")

‎TESTING.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ service.
286286
values never appear in a runner command. Values are taken literally, without
287287
quoting.
288288
- **Fixture.** Put the service's fixture in a support crate under
289-
`tests/support/<service>`, so any suite can depend on it, or reuse the
290-
existing one. It defines the variable names as constants and a
289+
`tests/support/<service>`, named `<service>-support`, so any suite can
290+
depend on it, or reuse the existing one. It defines the variable names as constants and a
291291
`<Service>Context::new(cx)` that reads them, waits for the service, and
292292
wraps the testkit `Context`. Each test calls it on its first line.
293293
Nextest runs each test in its own process, so the fixture builds its
@@ -526,16 +526,17 @@ guest setup. `tests/tmachine/artifacts.nix` keeps the follow-up exclusions expli
526526
the same filter for the generated inventory, so excluded binaries cannot appear
527527
as false passes or silently re-enter the archive.
528528

529-
The Podman driver suite (`tests/suites/drivers/podman`, package
530-
`podman-driver`) compares OpenShell and direct Podman user-namespace mappings.
529+
Driver suites live in `tests/suites/drivers/<driver>`, with the package named
530+
after the driver. The Podman driver suite (`tests/suites/drivers/podman`)
531+
compares OpenShell and direct Podman user-namespace mappings.
531532
Each `fedora-podman-{rootful,rootless}-userns-<mode>` environment configures
532533
the gateway with one mode (`default`, `auto`, `keep-id` or `private`); only the
533534
`binaries` installer applies it:
534535

535536
```shell
536537
nix run .#openshell-test-runner -- \
537538
--environment fedora-podman-rootless-userns-keep-id --installer binaries \
538-
--gateway tmachine --family drivers --package podman-driver
539+
--gateway tmachine --family drivers --package podman
539540
```
540541

541542
The `oci-image` feature suite (`tests/suites/features/oci-image`) checks OCI

‎tests/suites/drivers/Cargo.lock‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
# The package isn't named `podman` because the support crate it depends on is.
54
[package]
6-
name = "podman-driver"
5+
name = "podman"
76
description = "Drivers suite: Podman driver behavior, such as user namespaces"
87
version = "0.0.0"
98
edition = "2024"
@@ -13,6 +12,6 @@ repository = "https://github.com/NVIDIA/OpenShell"
1312
publish = false
1413

1514
[dependencies]
16-
container-engine = { path = "../../../support/container-engine" }
15+
container-engine-support = { path = "../../../support/container-engine" }
1716
openshell-testkit = { path = "../../../testkit/testkit" }
18-
podman = { path = "../../../support/podman" }
17+
podman-support = { path = "../../../support/podman" }

‎tests/suites/drivers/podman/tests/userns.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
//! Podman driver user namespaces.
55
//!
66
//! The environment configures the gateway with one user-namespace mode and
7-
//! publishes it (see the `podman` support crate). The test compares a
7+
//! publishes it (see the `podman-support` crate). The test compares a
88
//! sandbox's UID map with the one Podman itself gives a container in the same
99
//! mode, so it doesn't bake a particular Podman mapping into the test.
1010
11-
use container_engine::Engine;
12-
use podman::{Userns, normalize_uid_map, reference_uid_map};
11+
use container_engine_support::Engine;
12+
use podman_support::{Userns, normalize_uid_map, reference_uid_map};
1313
use testkit::{Context, Error, ResultExt as _};
1414

1515
const WORKSPACE_OK: &str = "podman-userns-workspace-ok";

‎tests/suites/features/Cargo.lock‎

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tests/suites/features/keycloak-provider-refresh/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ repository = "https://github.com/NVIDIA/OpenShell"
1212
publish = false
1313

1414
[dependencies]
15-
keycloak = { path = "../../../support/keycloak" }
15+
keycloak-support = { path = "../../../support/keycloak" }
1616
openshell-testkit = { path = "../../../testkit/testkit" }
1717
tempfile = "3"

‎tests/suites/features/keycloak-provider-refresh/tests/provider_refresh.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
use std::io::Write as _;
1010

11-
use keycloak::KeycloakContext;
11+
use keycloak_support::KeycloakContext;
1212
use testkit::{CliOutput, Context, Error, ResultExt as _};
1313

1414
const CREDENTIAL_KEY: &str = "KEYCLOAK_ACCESS_TOKEN";
@@ -135,7 +135,7 @@ fn combined(output: &CliOutput) -> String {
135135

136136
fn write_profile(
137137
profile_id: &str,
138-
keycloak: &keycloak::Keycloak,
138+
keycloak: &keycloak_support::Keycloak,
139139
) -> testkit::Result<tempfile::NamedTempFile> {
140140
let issuer_token_url = keycloak.token_endpoint();
141141
let profile = format!(

‎tests/suites/features/oci-image/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repository = "https://github.com/NVIDIA/OpenShell"
1212
publish = false
1313

1414
[dependencies]
15-
container-engine = { path = "../../../support/container-engine" }
15+
container-engine-support = { path = "../../../support/container-engine" }
1616
openshell-testkit = { path = "../../../testkit/testkit" }
1717
serde_json = "1"
1818
tempfile = "3"

‎tests/suites/features/oci-image/tests/oci_image.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
//! OCI image behavior shared by the Docker and Podman compute drivers.
55
//!
66
//! Each test builds a small image on `testkit::base_image()` with the
7-
//! gateway's container engine (see the `container-engine` crate), creates a
7+
//! gateway's container engine (see the `container-engine-support` crate), creates a
88
//! sandbox from it through the CLI, and checks the process identity,
99
//! privileges, workspace, and image content seen by both the sandbox main
1010
//! process and `sandbox exec`. Some tests also inspect the containers the
1111
//! driver created, through the same engine.
1212
13-
use container_engine::{Engine, Image};
13+
use container_engine_support::{Engine, Image};
1414
use serde_json::Value;
1515
use testkit::sdk::DeleteOptions;
1616
use testkit::{Context, DELETE_TIMEOUT, Error, Result, ResultExt as _};

0 commit comments

Comments
 (0)