feat(plugin): add kubernetes fast upload interceptor

This commit is contained in:
Dotta
2026-05-13 12:01:34 -05:00
committed by Chris Farhood
parent a6c2e0392b
commit fcbbd50b60
8 changed files with 400 additions and 24 deletions
@@ -1,5 +1,6 @@
import { describe, it, expect } from "vitest";
import plugin, {
buildSandboxExecCommand,
buildSandboxExecShellCommand,
extractAdapterEnvFromProcess,
} from "../../src/plugin.js";
@@ -161,4 +162,21 @@ describe("plugin", () => {
}),
).toBe("pnpm test -- --runInBand");
});
it("passes command and args directly to Kubernetes exec", () => {
expect(
buildSandboxExecCommand({
command: "sh",
args: ["-c", "printf '%s' ok"],
}),
).toEqual(["sh", "-c", "printf '%s' ok"]);
});
it("wraps command-only execution in a login shell", () => {
expect(
buildSandboxExecCommand({
command: "pnpm test -- --runInBand",
}),
).toEqual(["/bin/sh", "-lc", "pnpm test -- --runInBand"]);
});
});