added tests that don't depend on shebang

pull/84/head
Stephen Kirby 2 years ago
parent 2f248dd91f
commit ac5c275d8d

@ -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
});

@ -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");
// ...
// });
});

@ -30,5 +30,4 @@ describe("personalize", async () => {
"It will run every time your workspace starts. Use it to install personal packages!",
]);
});
});

Loading…
Cancel
Save