diff --git a/vscode-desktop/main.test.ts b/vscode-desktop/main.test.ts index dfcd904..ac4133f 100644 --- a/vscode-desktop/main.test.ts +++ b/vscode-desktop/main.test.ts @@ -13,4 +13,15 @@ describe("vscode-desktop", async () => { agent_id: "foo", }); + + it("default output", async () => { + const state = await runTerraformApply(import.meta.dir, { + agent_id: "foo", + }); + expect(state.outputs.vscode_url.value).toBe( + "vscode://coder.coder-remote/open?owner=default&workspace=default&token=$SESSION_TOKEN" + ); + }); + + }); diff --git a/vscode-desktop/main.tf b/vscode-desktop/main.tf index fa161fb..cc3340a 100644 --- a/vscode-desktop/main.tf +++ b/vscode-desktop/main.tf @@ -44,3 +44,8 @@ resource "coder_app" "vscode" { "&token=$SESSION_TOKEN", ]) } + +output "vscode_url" { + value = coder_app.vscode.url + description = "VS Code Desktop URL." +} diff --git a/vscode-web/main.test.ts b/vscode-web/main.test.ts index 73c64c2..dd31e86 100644 --- a/vscode-web/main.test.ts +++ b/vscode-web/main.test.ts @@ -9,7 +9,8 @@ describe("vscode-web", async () => { await runTerraformInit(import.meta.dir); - // replaces testRequiredVariables due to license var + // replaces testRequiredVariables due to license variable + // may add a testRequiredVariablesWithLicense function later it("missing agent_id", async () => { try { await runTerraformApply(import.meta.dir, {