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

Add catch blocks in all after() statements #171723

Closed
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
Expand Up @@ -39,7 +39,12 @@ export default function (providerContext: FtrProviderContext) {
});

after(async () => {
await kibanaServer.savedObjects.cleanStandardList();
try {
await kibanaServer.savedObjects.cleanStandardList();
} catch (error) {
// eslint-disable-next-line no-console
console.log('cis_integration.ts#after() failed', error);
}
});

describe('CNVM AWS', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});

after(async () => {
await cspDashboard.index.remove();
try {
await cspDashboard.index.remove();
} catch (error) {
// eslint-disable-next-line no-console
console.log('compliance_dashboard.ts#after() failed', error);
}
});

describe('Kubernetes Dashboard', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});

after(async () => {
await findings.index.remove();
try {
await findings.index.remove();
} catch (error) {
// eslint-disable-next-line no-console
console.log('findings.ts#after() failed', error);
}
});

describe('SearchBar', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});

after(async () => {
await findings.index.remove();
await findings.detectionRuleApi.remove();
try {
await findings.index.remove();
await findings.detectionRuleApi.remove();
} catch (error) {
// eslint-disable-next-line no-console
console.log('findings_alerts.ts#after() failed', error);
}
});

beforeEach(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});

after(async () => {
await findings.index.remove();
try {
await findings.index.remove();
} catch (error) {
// eslint-disable-next-line no-console
console.log('findings_old_data.ts#after() failed', error);
}
});

describe('Findings page with old data', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});

after(async () => {
await index.removeFindings();
try {
await index.removeFindings();
} catch (error) {
// eslint-disable-next-line no-console
console.log('vulnerability_dashboard.ts#after() failed', error);
}
});

describe('Vulnerability Dashboard', () => {
Expand Down