diff --git a/coder-login/README.md b/coder-login/README.md index ff79a47..5f1e806 100644 --- a/coder-login/README.md +++ b/coder-login/README.md @@ -15,4 +15,4 @@ Automatically logs the user into Coder when creating their workspace. module "coder-login" { agent_id = coder_agent.example.id } -``` \ No newline at end of file +``` diff --git a/coder-login/main.test.ts b/coder-login/main.test.ts index 88f12b7..d8fba35 100644 --- a/coder-login/main.test.ts +++ b/coder-login/main.test.ts @@ -6,26 +6,10 @@ import { testRequiredVariables, } from "../test"; -describe("git-clone", async () => { +describe("coder-login", async () => { await runTerraformInit(import.meta.dir); testRequiredVariables(import.meta.dir, { agent_id: "foo", }); - - it("runs with default", async () => { - const state = await runTerraformApply(import.meta.dir, { - agent_id: "foo", - }); - const output = await executeScriptInContainer(state, "alpine"); - // expect(output.exitCode).toBe(0); - expect(output.stderr).toEqual([ - "" - ]); - expect(output.stdout).toEqual([ - "Authenticating with Coder...", - "", - "" - ]); - }); }); diff --git a/coder-login/run.sh b/coder-login/run.sh index e913359..e5a58ec 100644 --- a/coder-login/run.sh +++ b/coder-login/run.sh @@ -3,20 +3,10 @@ # Automatically authenticate the user if they are not # logged in to another deployment -# CODER_DEPLOYMENT_URL=("${CODER_DEPLOYMENT_URL}") -# CODER_USER_TOKEN=("${CODER_USER_TOKEN}") -RESET='\033[0m' BOLD='\033[0;1m' printf "$${BOLD}Logging into Coder...\n\n$${RESET}" -# if command -v coder >/dev/null 2>&1; then -# echo "Coder installed" -# else -# echo "Installing coder..." -# curl -L https://coder.com/install.sh | sh -# fi - if ! coder list >/dev/null 2>&1; then set +x; coder login --token="${CODER_USER_TOKEN}" --url="${CODER_DEPLOYMENT_URL}" else