added tests that don't depend on shebang
This commit is contained in:
@@ -1,10 +1,5 @@
|
|||||||
import { describe, expect, it } from "bun:test";
|
import { describe, expect, it } from "bun:test";
|
||||||
import {
|
import { runTerraformInit, testRequiredVariables } from "../test";
|
||||||
executeScriptInContainer,
|
|
||||||
runTerraformApply,
|
|
||||||
runTerraformInit,
|
|
||||||
testRequiredVariables,
|
|
||||||
} from "../test";
|
|
||||||
|
|
||||||
describe("code-server", async () => {
|
describe("code-server", async () => {
|
||||||
await runTerraformInit(import.meta.dir);
|
await runTerraformInit(import.meta.dir);
|
||||||
@@ -12,4 +7,6 @@ describe("code-server", async () => {
|
|||||||
testRequiredVariables(import.meta.dir, {
|
testRequiredVariables(import.meta.dir, {
|
||||||
agent_id: "foo",
|
agent_id: "foo",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// More tests depend on shebang refactors
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import {
|
|||||||
execContainer,
|
execContainer,
|
||||||
} from "../test";
|
} from "../test";
|
||||||
|
|
||||||
|
|
||||||
// executes the coder script after installing pip
|
// executes the coder script after installing pip
|
||||||
const executeScriptInContainerWithPip = async (
|
const executeScriptInContainerWithPip = async (
|
||||||
state: TerraformState,
|
state: TerraformState,
|
||||||
@@ -23,7 +22,7 @@ const executeScriptInContainerWithPip = async (
|
|||||||
}> => {
|
}> => {
|
||||||
const instance = findResourceInstance(state, "coder_script");
|
const instance = findResourceInstance(state, "coder_script");
|
||||||
const id = await runContainer(image);
|
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 resp = await execContainer(id, [shell, "-c", instance.script]);
|
||||||
const stdout = resp.stdout.trim().split("\n");
|
const stdout = resp.stdout.trim().split("\n");
|
||||||
const stderr = resp.stderr.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.
|
// currently times out.
|
||||||
// it("runs with pip3", async () => {
|
// it("runs with pip3", async () => {
|
||||||
// ...
|
// ...
|
||||||
// const output = await executeScriptInContainerWithPip(state, "alpine");
|
// 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!",
|
"It will run every time your workspace starts. Use it to install personal packages!",
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user