From ac5c275d8dc7377aac931e68898e44447213c6ea Mon Sep 17 00:00:00 2001 From: Stephen Kirby Date: Tue, 10 Oct 2023 17:50:37 +0000 Subject: [PATCH] added tests that don't depend on shebang --- code-server/main.test.ts | 9 +++------ jupyterlab/main.test.ts | 6 ++---- personalize/main.test.ts | 1 - 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/code-server/main.test.ts b/code-server/main.test.ts index 6afbd5b..daf3ac1 100644 --- a/code-server/main.test.ts +++ b/code-server/main.test.ts @@ -1,10 +1,5 @@ import { describe, expect, it } from "bun:test"; -import { - executeScriptInContainer, - runTerraformApply, - runTerraformInit, - testRequiredVariables, -} from "../test"; +import { runTerraformInit, testRequiredVariables } from "../test"; describe("code-server", async () => { await runTerraformInit(import.meta.dir); @@ -12,4 +7,6 @@ describe("code-server", async () => { testRequiredVariables(import.meta.dir, { agent_id: "foo", }); + + // More tests depend on shebang refactors }); diff --git a/jupyterlab/main.test.ts b/jupyterlab/main.test.ts index 97e6329..2597dc2 100644 --- a/jupyterlab/main.test.ts +++ b/jupyterlab/main.test.ts @@ -10,7 +10,6 @@ import { execContainer, } from "../test"; - // executes the coder script after installing pip const executeScriptInContainerWithPip = async ( state: TerraformState, @@ -23,7 +22,7 @@ const executeScriptInContainerWithPip = async ( }> => { const instance = findResourceInstance(state, "coder_script"); const id = await runContainer(image); - const respPip = await execContainer(id, [shell, "-c", "apk add py3-pip"]); + const respPip = await execContainer(id, [shell, "-c", "apk add py3-pip"]); const resp = await execContainer(id, [shell, "-c", instance.script]); const stdout = resp.stdout.trim().split("\n"); const stderr = resp.stderr.trim().split("\n"); @@ -54,12 +53,11 @@ describe("jupyterlab", async () => { ]); }); - // TODO: Add faster test to run with pip3. + // TODO: Add faster test to run with pip3. // currently times out. // it("runs with pip3", async () => { // ... // const output = await executeScriptInContainerWithPip(state, "alpine"); // ... // }); - }); diff --git a/personalize/main.test.ts b/personalize/main.test.ts index cb31a9b..9c8134e 100644 --- a/personalize/main.test.ts +++ b/personalize/main.test.ts @@ -30,5 +30,4 @@ describe("personalize", async () => { "It will run every time your workspace starts. Use it to install personal packages!", ]); }); - });