started test, standardized git not installed message
parent
f7c5c46a21
commit
ca1d4547cb
@ -0,0 +1,37 @@
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import {
|
||||
executeScriptInContainer,
|
||||
runTerraformApply,
|
||||
runTerraformInit,
|
||||
testRequiredVariables,
|
||||
} from "../test";
|
||||
|
||||
describe("git-config", async () => {
|
||||
await runTerraformInit(import.meta.dir);
|
||||
|
||||
testRequiredVariables(import.meta.dir, {
|
||||
agent_id: "foo",
|
||||
});
|
||||
|
||||
it("fails without git", async () => {
|
||||
const state = await runTerraformApply(import.meta.dir, {
|
||||
agent_id: "foo",
|
||||
});
|
||||
const output = await executeScriptInContainer(state, "alpine");
|
||||
expect(output.exitCode).toBe(1);
|
||||
expect(output.stdout).toEqual(["Git is not installed!"]);
|
||||
});
|
||||
|
||||
// it("runs with git", async () => {
|
||||
// const state = await runTerraformApply(import.meta.dir, {
|
||||
// agent_id: "foo",
|
||||
// url: "fake-url",
|
||||
// });
|
||||
// const output = await executeScriptInContainer(state, "alpine/git");
|
||||
// expect(output.exitCode).toBe(128);
|
||||
// expect(output.stdout).toEqual([
|
||||
// "Creating directory ~/fake-url...",
|
||||
// "Cloning fake-url to ~/fake-url...",
|
||||
// ]);
|
||||
// });
|
||||
});
|
Loading…
Reference in New Issue