Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 8eec58e

Browse files
committed
prep for merge
1 parent f7de342 commit 8eec58e

File tree

4 files changed

+48
-31
lines changed

4 files changed

+48
-31
lines changed

dotfiles/main.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { describe, expect, it } from "bun:test";
2+
import {
3+
runTerraformApply,
4+
runTerraformInit,
5+
testRequiredVariables,
6+
} from "../test";
7+
8+
describe("dotfiles", async () => {
9+
await runTerraformInit(import.meta.dir);
10+
11+
testRequiredVariables(import.meta.dir, {
12+
agent_id: "foo",
13+
});
14+
15+
});

fly-region/main.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { describe, expect, it } from "bun:test";
22
import {
3-
executeScriptInContainer,
43
runTerraformApply,
54
runTerraformInit,
65
testRequiredVariables,

gcp-region/main.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { describe, expect, it } from "bun:test";
22
import {
3-
executeScriptInContainer,
43
runTerraformApply,
54
runTerraformInit,
65
testRequiredVariables,

personalize/main.test.ts

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
testRequiredVariables,
88
runContainer,
99
execContainer,
10-
findResourceInstance
10+
findResourceInstance,
1111
} from "../test";
1212

1313
describe("personalize", async () => {
@@ -27,35 +27,39 @@ describe("personalize", async () => {
2727
"✨ \u001b[0;1mYou don't have a personalize script!",
2828
"",
2929
"Run \u001b[36;40;1mtouch ~/personalize && chmod +x ~/personalize\u001b[0m to create one.",
30-
"It will run every time your workspace starts. Use it to install personal packages!"
30+
"It will run every time your workspace starts. Use it to install personal packages!",
3131
]);
3232
});
3333

34-
it("runs with personalize script", async () => {
35-
const state = await runTerraformApply(import.meta.dir, {
36-
agent_id: "foo",
37-
});
38-
const instance = findResourceInstance(state, "coder_script");
39-
const id = await runContainer("alpine");
40-
const respInit = await execContainer(id, ["sh", "-c", "touch ~/personalize && echo \"echo test\" > ~/personalize && chmod +x ~/personalize && echo \"completed touch cmds\""]);
41-
42-
console.log("\n id = ", id, "\n")
43-
44-
console.log("\n====== init ==== stdout (", respInit.exitCode, "):");
45-
console.log(respInit.stdout);
46-
console.log("====== init ==== stderr:");
47-
console.log(respInit.stderr);
48-
console.log("======");
49-
const resp = await execContainer(id, ["sh", "-c", instance.script]);
50-
console.log("====== resp ==== stdout (", resp.exitCode, "):");
51-
console.log(resp.stdout);
52-
console.log("====== resp ==== stderr:");
53-
console.log(resp.stderr);
54-
console.log("======");
55-
// await new Promise((resolve) => setTimeout(resolve, 100000000000));
56-
const stdout = resp.stdout.trim().split("\n");
57-
const stderr = resp.stderr.trim().split("\n");
58-
expect(resp.exitCode).toBe(0);
59-
expect(stdout).toEqual([""]);
60-
});
34+
// it("runs with personalize script", async () => {
35+
// const state = await runTerraformApply(import.meta.dir, {
36+
// agent_id: "foo",
37+
// });
38+
// const instance = findResourceInstance(state, "coder_script");
39+
// const id = await runContainer("alpine");
40+
// const respInit = await execContainer(id, [
41+
// "sh",
42+
// "-c",
43+
// 'touch ~/personalize && echo "echo test" > ~/personalize && chmod +x ~/personalize && echo "completed touch cmds"',
44+
// ]);
45+
46+
// console.log("\n id = ", id, "\n");
47+
48+
// console.log("\n====== init ==== stdout (", respInit.exitCode, "):");
49+
// console.log(respInit.stdout);
50+
// console.log("====== init ==== stderr:");
51+
// console.log(respInit.stderr);
52+
// console.log("======");
53+
// const resp = await execContainer(id, ["sh", "-c", instance.script]);
54+
// console.log("====== resp ==== stdout (", resp.exitCode, "):");
55+
// console.log(resp.stdout);
56+
// console.log("====== resp ==== stderr:");
57+
// console.log(resp.stderr);
58+
// console.log("======");
59+
// // await new Promise((resolve) => setTimeout(resolve, 100000000000));
60+
// const stdout = resp.stdout.trim().split("\n");
61+
// const stderr = resp.stderr.trim().split("\n");
62+
// expect(resp.exitCode).toBe(0);
63+
// expect(stdout).toEqual([""]);
64+
// });
6165
});

0 commit comments

Comments
 (0)