* refactor(agent): harden local agent volume lifecycle * chore(test): remove un-used variable * refactor(agent): create dedicated jobs for recurring tasks * chore: pr feedbacks * test: add missing fake agent controller
18 lines
603 B
TypeScript
18 lines
603 B
TypeScript
import { afterEach, expect, test, vi } from "vitest";
|
|
import { config } from "../../core/config";
|
|
import { CleanupDanglingMountsJob } from "../cleanup-dangling";
|
|
import * as mountinfo from "../../utils/mountinfo";
|
|
|
|
afterEach(() => {
|
|
config.flags.enableLocalAgent = true;
|
|
vi.restoreAllMocks();
|
|
});
|
|
|
|
test("skips controller-local mount inspection when local volume execution is agent-owned", async () => {
|
|
config.flags.enableLocalAgent = true;
|
|
const readMountInfo = vi.spyOn(mountinfo, "readMountInfo");
|
|
|
|
await new CleanupDanglingMountsJob().run();
|
|
|
|
expect(readMountInfo).not.toHaveBeenCalled();
|
|
});
|