Merge pull request #13800 from SaloniRathi/fix-test-error-messages

core/mount/manager: improve TestMkdirHandler failure messages
This commit is contained in:
Mike Brown
2026-07-17 05:05:24 +00:00
committed by GitHub

View File

@@ -77,14 +77,14 @@ func TestMkdirHandler(t *testing.T) {
t.Fatalf("expected directory")
}
if fi.Mode().Perm() != testmode {
t.Fatalf("expected mode 0775 got %o", fi.Mode().Perm())
t.Fatalf("expected mode %04o got %04o", testmode, fi.Mode().Perm())
}
sys := fi.Sys().(*syscall.Stat_t)
if int(sys.Uid) != luid {
t.Fatalf("expected uid 1000 got %d", sys.Uid)
t.Fatalf("expected uid %d got %d", luid, sys.Uid)
}
if int(sys.Gid) != lgid {
t.Fatalf("expected gid 1000 got %d", sys.Gid)
t.Fatalf("expected gid %d got %d", lgid, sys.Gid)
}
m.Options = append(m.Options, fmt.Sprintf("X-containerd.mkdir.path=%s", filepath.Join(td, "notinroot")))