From 035128d8c09d31d9819a475f0a383c243e77b5f1 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Sat, 21 Sep 2024 00:44:57 +0500 Subject: [PATCH] Switch from pip3 to pipx in JupyterLab tests --- jupyterlab/main.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jupyterlab/main.test.ts b/jupyterlab/main.test.ts index 2597dc21..122de774 100644 --- a/jupyterlab/main.test.ts +++ b/jupyterlab/main.test.ts @@ -22,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 respPipx = await execContainer(id, [shell, "-c", "apk add pipx"]); const resp = await execContainer(id, [shell, "-c", instance.script]); const stdout = resp.stdout.trim().split("\n"); const stderr = resp.stderr.trim().split("\n"); @@ -40,7 +40,7 @@ describe("jupyterlab", async () => { agent_id: "foo", }); - it("fails without pip3", async () => { + it("fails without pipx", async () => { const state = await runTerraformApply(import.meta.dir, { agent_id: "foo", }); @@ -48,14 +48,14 @@ describe("jupyterlab", async () => { expect(output.exitCode).toBe(1); expect(output.stdout).toEqual([ "\u001B[0;1mInstalling jupyterlab!", - "pip3 is not installed", - "Please install pip3 in your Dockerfile/VM image before running this script", + "pipx is not installed", + "Please install pipx in your Dockerfile/VM image before running this script", ]); }); - // TODO: Add faster test to run with pip3. + // TODO: Add faster test to run with pipx. // currently times out. - // it("runs with pip3", async () => { + // it("runs with pipx", async () => { // ... // const output = await executeScriptInContainerWithPip(state, "alpine"); // ...