test: remove nala after testing it

This commit is contained in:
Amin Yahyaabadi 2023-09-05 11:04:10 -07:00
parent 14a1b4d654
commit 8d969d8dbd
1 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,7 @@
import { setupNala } from "../nala" import { setupNala } from "../nala"
import { testBin } from "../../utils/tests/test-helpers" import { testBin } from "../../utils/tests/test-helpers"
import { isUbuntu } from "../../utils/env/isUbuntu" import { isUbuntu } from "../../utils/env/isUbuntu"
import { execRootSync } from "admina"
jest.setTimeout(300000) jest.setTimeout(300000)
describe("setup-nala", () => { describe("setup-nala", () => {
@ -12,4 +13,10 @@ describe("setup-nala", () => {
const installInfo = await setupNala("", "", process.arch) const installInfo = await setupNala("", "", process.arch)
await testBin("nala", ["--version"], installInfo?.binDir) 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"])
})
}) })