Skip to content

Commit 698d816

Browse files
committed
output vscode-desktop url and finished tests
1 parent f320040 commit 698d816

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

vscode-desktop/main.test.ts

+11
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,15 @@ describe("vscode-desktop", async () => {
1313
agent_id: "foo",
1414
});
1515

16+
17+
it("default output", async () => {
18+
const state = await runTerraformApply(import.meta.dir, {
19+
agent_id: "foo",
20+
});
21+
expect(state.outputs.vscode_url.value).toBe(
22+
"vscode://coder.coder-remote/open?owner=default&workspace=default&token=$SESSION_TOKEN"
23+
);
24+
});
25+
26+
1627
});

vscode-desktop/main.tf

+5
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,8 @@ resource "coder_app" "vscode" {
4444
"&token=$SESSION_TOKEN",
4545
])
4646
}
47+
48+
output "vscode_url" {
49+
value = coder_app.vscode.url
50+
description = "VS Code Desktop URL."
51+
}

vscode-web/main.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ describe("vscode-web", async () => {
99
await runTerraformInit(import.meta.dir);
1010

1111

12-
// replaces testRequiredVariables due to license var
12+
// replaces testRequiredVariables due to license variable
13+
// may add a testRequiredVariablesWithLicense function later
1314
it("missing agent_id", async () => {
1415
try {
1516
await runTerraformApply(import.meta.dir, {

0 commit comments

Comments
 (0)