added starter test for personalize
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import { describe } from "bun:test";
|
import { describe } from "bun:test";
|
||||||
import { runTerraformInit, testRequiredVariables } from "../test";
|
import { runTerraformInit, testRequiredVariables } from "../test";
|
||||||
|
|
||||||
describe("jetbrains-gateway`", async () => {
|
describe("jetbrains-gateway", async () => {
|
||||||
await runTerraformInit(import.meta.dir);
|
await runTerraformInit(import.meta.dir);
|
||||||
|
|
||||||
await testRequiredVariables(import.meta.dir, {
|
await testRequiredVariables(import.meta.dir, {
|
||||||
|
|||||||
34
personalize/main.test.ts
Normal file
34
personalize/main.test.ts
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import { describe, expect, it } from "bun:test";
|
||||||
|
import {
|
||||||
|
executeScriptInContainer,
|
||||||
|
runTerraformApply,
|
||||||
|
runTerraformInit,
|
||||||
|
testRequiredVariables,
|
||||||
|
runContainer,
|
||||||
|
execContainer,
|
||||||
|
findResourceInstance
|
||||||
|
} from "../test";
|
||||||
|
|
||||||
|
describe("personalize", async () => {
|
||||||
|
await runTerraformInit(import.meta.dir);
|
||||||
|
|
||||||
|
testRequiredVariables(import.meta.dir, {
|
||||||
|
agent_id: "foo",
|
||||||
|
});
|
||||||
|
|
||||||
|
it("warns without personalize script", async () => {
|
||||||
|
const state = await runTerraformApply(import.meta.dir, {
|
||||||
|
agent_id: "foo",
|
||||||
|
});
|
||||||
|
const output = await executeScriptInContainer(state, "alpine");
|
||||||
|
expect(output.exitCode).toBe(0);
|
||||||
|
expect(output.stdout).toEqual([
|
||||||
|
"✨ \u001b[0;1mYou don't have a personalize script!",
|
||||||
|
"",
|
||||||
|
"Run \u001b[36;40;1mtouch ~/personalize && chmod +x ~/personalize\u001b[0m to create one.",
|
||||||
|
"It will run every time your workspace starts. Use it to install personal packages!"
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user