feat(plugin): add kubernetes fast upload interceptor
This commit is contained in:
@@ -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"]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user