output vscode-desktop url and finished tests

pull/84/head
Stephen Kirby 2 years ago
parent f320040093
commit 698d8168f2

@ -13,4 +13,15 @@ describe("vscode-desktop", async () => {
agent_id: "foo", 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"
);
});
}); });

@ -44,3 +44,8 @@ resource "coder_app" "vscode" {
"&token=$SESSION_TOKEN", "&token=$SESSION_TOKEN",
]) ])
} }
output "vscode_url" {
value = coder_app.vscode.url
description = "VS Code Desktop URL."
}

@ -9,7 +9,8 @@ describe("vscode-web", async () => {
await runTerraformInit(import.meta.dir); 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 () => { it("missing agent_id", async () => {
try { try {
await runTerraformApply(import.meta.dir, { await runTerraformApply(import.meta.dir, {

Loading…
Cancel
Save