mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 12:56:01 -06:00
test(sandbox): cover zero Podman host ids
This commit is contained in:
@@ -649,12 +649,16 @@ describe("resolveSandboxContext", () => {
|
||||
|
||||
expect(result?.backendId).toBe("podman");
|
||||
const workspaceStat = await fs.stat("/tmp/openclaw-test");
|
||||
const expectedUser =
|
||||
workspaceStat.uid === 0 || workspaceStat.gid === 0
|
||||
? undefined
|
||||
: `${workspaceStat.uid}:${workspaceStat.gid}`;
|
||||
expect(backendFactory).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
cfg: expect.objectContaining({
|
||||
backend: "podman",
|
||||
docker: expect.objectContaining({
|
||||
user: `${workspaceStat.uid}:${workspaceStat.gid}`,
|
||||
user: expectedUser,
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user