detached 35b40b2

test(integration): close the probe driver before the container scenario

The probe that detects a rootless daemon kept the host-wide runner lock, so
the scenario's own driver failed with 'another ermite-runner is running'.
Invisible while the test was only ever skipped (rootless daemon).
commit
35b40b24164a1b6133033209173673d89086dad1
author
brice · · 2026-10-12 21:32 UTC
parent
ea0a5ee
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +6 -1
M internal/sandbox/integration/container_test.go +6 -1
@@ -21,12 +21,17 @@ func TestContainerStubExecutor(t *testing.T) {
2121 ctx := ctxWithLog(t)
2222 cfg := loadConfig(t, sandbox.Container)
2323 // A rootless daemon is refused with a clear error: nothing to test there.
24- if _, err := drivers.Factories().Container(ctx, cfg); err != nil {
24+ probe, err := drivers.Factories().Container(ctx, cfg)
25+ if err != nil {
2526 if strings.Contains(err.Error(), "rootless") {
2627 t.Skipf("the Docker daemon is rootless, as designed the driver refuses it: %v", err)
2728 }
2829 t.Fatal(err)
2930 }
31+ // The probe holds the host-wide lock: release it before the scenario takes it.
32+ if err := probe.Close(); err != nil {
33+ t.Fatal(err)
34+ }
3035 scenario(t, ctx, cfg, sandbox.Container, func(t *testing.T, sb sandbox.Sandbox) {
3136 out, err := exec.Command("docker", "ps", "-q", "--filter", "label="+sandbox.LabelJob).Output()
3237 if err != nil {
@@ -21,12 +21,17 @@ func TestContainerStubExecutor(t *testing.T) {
21 ctx := ctxWithLog(t)21 ctx := ctxWithLog(t)
22 cfg := loadConfig(t, sandbox.Container)22 cfg := loadConfig(t, sandbox.Container)
23 // A rootless daemon is refused with a clear error: nothing to test there.23 // A rootless daemon is refused with a clear error: nothing to test there.
24- if _, err := drivers.Factories().Container(ctx, cfg); err != nil {24+ probe, err := drivers.Factories().Container(ctx, cfg)
25+ if err != nil {
25 if strings.Contains(err.Error(), "rootless") {26 if strings.Contains(err.Error(), "rootless") {
26 t.Skipf("the Docker daemon is rootless, as designed the driver refuses it: %v", err)27 t.Skipf("the Docker daemon is rootless, as designed the driver refuses it: %v", err)
27 }28 }
28 t.Fatal(err)29 t.Fatal(err)
29 }30 }
31+ // The probe holds the host-wide lock: release it before the scenario takes it.
32+ if err := probe.Close(); err != nil {
33+ t.Fatal(err)
34+ }
30 scenario(t, ctx, cfg, sandbox.Container, func(t *testing.T, sb sandbox.Sandbox) {35 scenario(t, ctx, cfg, sandbox.Container, func(t *testing.T, sb sandbox.Sandbox) {
31 out, err := exec.Command("docker", "ps", "-q", "--filter", "label="+sandbox.LabelJob).Output()36 out, err := exec.Command("docker", "ps", "-q", "--filter", "label="+sandbox.LabelJob).Output()
32 if err != nil {37 if err != nil {

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 4

Tags 11

↑↓ moveenter openesc close