Skip to content

Commit

Permalink
fix(ci) use DISABLE_VM_TESTS environment variable to skip vm based tests
Browse files Browse the repository at this point in the history
Signed-off-by: David Edler <[email protected]>
  • Loading branch information
edlerd committed Sep 3, 2024
1 parent 2306c65 commit 51240de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/instances.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ test.beforeAll(async ({ browser, browserName }) => {
const page = await browser.newPage();
await createProfile(page, profile);
await createInstance(page, instance);
if (!process.env.CI) {
if (!process.env.DISABLE_VM_TESTS) {
await createInstance(page, vmInstance, "virtual-machine");
}
await page.close();
Expand All @@ -49,7 +49,7 @@ test.beforeAll(async ({ browser, browserName }) => {
test.afterAll(async ({ browser }) => {
const page = await browser.newPage();
await deleteInstance(page, instance);
if (!process.env.CI) {
if (!process.env.DISABLE_VM_TESTS) {
await deleteInstance(page, vmInstance);
}
await deleteProfile(page, profile);
Expand Down
4 changes: 4 additions & 0 deletions tests/iso-volumes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ test("use custom iso for instance launch", async ({ page, lxdVersion }) => {
lxdVersion === "5.0-edge",
"custom storage volume iso import not supported in lxd v5.0/edge",
);
test.skip(
Boolean(process.env.DISABLE_VM_TESTS),
"deactivated due to DISABLE_VM_TESTS environment variable",
);

const instance = randomInstanceName();
const isoName = randomIso();
Expand Down

0 comments on commit 51240de

Please sign in to comment.