feat: add mock coder since we now depend on coder command to sync scripts

This commit is contained in:
35C4n0r 2026-02-06 17:17:57 +00:00
parent 03ac608e1f
commit df2d72f608

View File

@ -115,6 +115,13 @@ export const setup = async (
}); });
props.registerCleanup(cleanup); props.registerCleanup(cleanup);
await execContainer(id, ["bash", "-c", `mkdir -p '${projectDir}'`]); await execContainer(id, ["bash", "-c", `mkdir -p '${projectDir}'`]);
// Add a mock coder CLI so that `coder exp sync` commands in the
// startup script succeed inside the test container.
await writeExecutable({
containerId: id,
filePath: "/usr/bin/coder",
content: "#!/bin/bash\nexit 0",
});
if (!props?.skipAgentAPIMock) { if (!props?.skipAgentAPIMock) {
await writeExecutable({ await writeExecutable({
containerId: id, containerId: id,