Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix E2E failures caused by inadequate resource clean-up #9614

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import type { Image, Linode, Disk } from '@linode/api-v4/types';
import type { Linode, Disk } from '@linode/api-v4/types';
import { imageFactory } from 'src/factories/images';
import { authenticate } from 'support/api/authentication';
import { createLinode, deleteLinodeById } from 'support/api/linodes';
import {
mockCreateImage,
mockGetCustomImages,
} from 'support/intercepts/images';
import { mockGetLinodeDisks } from 'support/intercepts/linodes';
import { cleanUp } from 'support/util/cleanup';
import { randomLabel, randomNumber, randomPhrase } from 'support/util/random';

const diskLabel = 'Debian 10 Disk';
Expand All @@ -31,7 +33,12 @@ const mockDisks: Disk[] = [
},
];

authenticate();
describe('create image', () => {
before(() => {
cleanUp('linodes');
});

it('captures image from Linode and mocks create image', () => {
const imageLabel = randomLabel();
const imageDescription = randomPhrase();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable sonarjs/no-duplicate-string */
import { authenticate } from 'support/api/authentication';
import { createLinode, deleteLinodeById } from 'support/api/linodes';
import {
containsClick,
Expand All @@ -8,9 +9,15 @@ import {
getClick,
} from 'support/helpers';
import { ui } from 'support/ui';
import { cleanUp } from 'support/util/cleanup';
import { apiMatcher } from 'support/util/intercepts';

authenticate();
describe('linode backups', () => {
before(() => {
cleanUp('linodes');
});

it('enable backups', () => {
createLinode().then((linode) => {
// intercept request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { authenticate } from 'support/api/authentication';
authenticate();
describe('longview', () => {
before(() => {
cleanUp('longview-clients');
cleanUp(['linodes', 'longview-clients']);
});

it('tests longview', () => {
Expand Down