You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1002 B
TypeScript
38 lines
1002 B
TypeScript
import { describe, expect, it } from "bun:test";
|
|
import {
|
|
executeScriptInContainer,
|
|
runTerraformApply,
|
|
runTerraformInit,
|
|
testRequiredVariables,
|
|
} from "../test";
|
|
|
|
describe("vscode-desktop", async () => {
|
|
await runTerraformInit(import.meta.dir);
|
|
|
|
testRequiredVariables(import.meta.dir, {
|
|
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",
|
|
);
|
|
|
|
const resources: any = state.resources;
|
|
expect(resources[1].instances[0].attributes.order).toBeNull();
|
|
});
|
|
|
|
it("expect order to be set", async () => {
|
|
const state = await runTerraformApply(import.meta.dir, {
|
|
agent_id: "foo",
|
|
order: "22",
|
|
});
|
|
|
|
const resources: any = state.resources;
|
|
expect(resources[1].instances[0].attributes.order).toBe(22);
|
|
});
|
|
});
|