From 545408935a0c0d02677fa2966f43177b47d4872b Mon Sep 17 00:00:00 2001 From: Sahil Date: Thu, 19 Nov 2026 02:21:14 +0530 Subject: [PATCH] test(shared): cover sandbox markers with an empty mode prefix Signed-off-by: Sahil --- packages/shared/sandbox_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/shared/sandbox_test.go b/packages/shared/sandbox_test.go index 51173af8..9e8b0188 100644 --- a/packages/shared/sandbox_test.go +++ b/packages/shared/sandbox_test.go @@ -24,6 +24,8 @@ func TestSandboxMarkerRoundTrips(t *testing.T) { func TestSandboxModeReadsTheWeakerModeWhenItCannotTell(t *testing.T) { cases := []struct{ env, want string }{ {"", ""}, + // A present marker with an empty mode does not imply run mode. + {":1.0.0", ""}, {"run:1.0.0", SandboxModeRun}, {"box:1.0.0", SandboxModeBox}, @@ -169,4 +171,4 @@ func TestVerifiedInSandboxBoxProbeReadsPidOne(t *testing.T) { if !confined { t.Errorf("PID 1 is %q, which is not a host init, so the probe should accept it", init) } -} \ No newline at end of file +}