fixed tests

pull/47/head
Stephen Kirby 2 years ago
parent 72652dcaaf
commit 10bba250e4

@ -11,15 +11,11 @@ describe("git-config", async () => {
testRequiredVariables(import.meta.dir, {
agent_id: "foo",
allow_username_change: true,
allow_email_change: true,
});
it("fails without git", async () => {
const state = await runTerraformApply(import.meta.dir, {
agent_id: "foo",
allow_username_change: true,
allow_email_change: true,
});
const output = await executeScriptInContainer(state, "alpine");
expect(output.exitCode).toBe(1);
@ -32,8 +28,6 @@ describe("git-config", async () => {
it("runs with git", async () => {
const state = await runTerraformApply(import.meta.dir, {
agent_id: "foo",
allow_username_change: true,
allow_email_change: true,
});
const output = await executeScriptInContainer(state, "alpine/git");
expect(output.exitCode).toBe(0);
@ -41,8 +35,8 @@ describe("git-config", async () => {
"\u001B[0;1mChecking git-config!",
"git-config: No user.email found, setting to ",
"git-config: No user.name found, setting to default",
"\u001B[0;1mgit-config: using email: ",
"",
"\u001B[0;1mgit-config: using email: ",
"\u001B[0;1mgit-config: using username: default",
]);
});

@ -33,7 +33,7 @@ data "coder_parameter" "user_email" {
count = var.allow_email_change ? 1 : 0
name = "user_email"
type = "string"
default = ""
default = ""
description = "Git user.email to be used for commits. Leave empty to default to Coder username."
display_name = "Git config user.email"
mutable = true

Loading…
Cancel
Save