7
7
testRequiredVariables ,
8
8
runContainer ,
9
9
execContainer ,
10
- findResourceInstance
10
+ findResourceInstance ,
11
11
} from "../test" ;
12
12
13
13
describe ( "personalize" , async ( ) => {
@@ -27,35 +27,39 @@ describe("personalize", async () => {
27
27
"✨ \u001b[0;1mYou don't have a personalize script!" ,
28
28
"" ,
29
29
"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!" ,
31
31
] ) ;
32
32
} ) ;
33
33
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
+ // });
61
65
} ) ;
0 commit comments