test(code-server): add validation check tests

pull/184/head
Michael Brewer 1 year ago
parent a150da4f47
commit 50f845ff69
No known key found for this signature in database
GPG Key ID: D7A137BA1254AFC7

@ -1,5 +1,9 @@
import { describe, expect, it } from "bun:test";
import { runTerraformInit, testRequiredVariables } from "../test";
import {
runTerraformApply,
runTerraformInit,
testRequiredVariables,
} from "../test";
describe("code-server", async () => {
await runTerraformInit(import.meta.dir);
@ -8,5 +12,27 @@ describe("code-server", async () => {
agent_id: "foo",
});
it("use_cached and offline can not be used together", () => {
const t = async () => {
await runTerraformApply(import.meta.dir, {
agent_id: "foo",
use_cached: "true",
offline: "true",
});
};
expect(t).toThrow("Offline and Use Cached can not be used together");
});
it("offline and extensions can not be used together", () => {
const t = async () => {
await runTerraformApply(import.meta.dir, {
agent_id: "foo",
offline: "true",
extensions: '["1", "2"]',
});
};
expect(t).toThrow("Offline mode does not allow extensions to be installed");
});
// More tests depend on shebang refactors
});

Loading…
Cancel
Save