diff --git a/src/nala/__tests__/nala.test.ts b/src/nala/__tests__/nala.test.ts index 7664b3b0..c12bc452 100644 --- a/src/nala/__tests__/nala.test.ts +++ b/src/nala/__tests__/nala.test.ts @@ -1,6 +1,7 @@ import { setupNala } from "../nala" import { testBin } from "../../utils/tests/test-helpers" import { isUbuntu } from "../../utils/env/isUbuntu" +import { execRootSync } from "admina" jest.setTimeout(300000) describe("setup-nala", () => { @@ -12,4 +13,10 @@ describe("setup-nala", () => { const installInfo = await setupNala("", "", process.arch) await testBin("nala", ["--version"], installInfo?.binDir) }) + + afterAll(() => { + // remove nala to run the rest of the tests with apt-get + execRootSync("apt-get", ["remove", "-y", "nala"]) + execRootSync("apt-get", ["remove", "-y", "nala-legacy"]) + }) })