placeholder test for jupyterlab with pip
This commit is contained in:
@@ -6,9 +6,13 @@ import {
|
||||
testRequiredVariables,
|
||||
findResourceInstance,
|
||||
runContainer,
|
||||
TerraformState,
|
||||
execContainer,
|
||||
} from "../test";
|
||||
|
||||
const executeScriptInContainer = async (
|
||||
|
||||
// executes the coder script after installing pip
|
||||
const executeScriptInContainerWithPip = async (
|
||||
state: TerraformState,
|
||||
image: string,
|
||||
shell: string = "sh",
|
||||
@@ -19,6 +23,7 @@ const executeScriptInContainer = async (
|
||||
}> => {
|
||||
const instance = findResourceInstance(state, "coder_script");
|
||||
const id = await runContainer(image);
|
||||
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");
|
||||
@@ -40,9 +45,6 @@ describe("jupyterlab", async () => {
|
||||
const state = await runTerraformApply(import.meta.dir, {
|
||||
agent_id: "foo",
|
||||
});
|
||||
|
||||
const instance = findResourceInstance(state, "coder_script");
|
||||
const id = await runContainer("alpine");
|
||||
const output = await executeScriptInContainer(state, "alpine");
|
||||
expect(output.exitCode).toBe(1);
|
||||
expect(output.stdout).toEqual([
|
||||
@@ -52,6 +54,12 @@ describe("jupyterlab", async () => {
|
||||
]);
|
||||
});
|
||||
|
||||
// TODO: Add test that runs with pip
|
||||
// May be best to use dockerfile
|
||||
// TODO: Add faster test to run with pip3.
|
||||
// currently times out.
|
||||
// it("runs with pip3", async () => {
|
||||
// ...
|
||||
// const output = await executeScriptInContainerWithPip(state, "alpine");
|
||||
// ...
|
||||
// });
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user