Skip to content

Commit

Permalink
[Cloud Security] fix vulnerability dashboard ftr flaky test (#187790)
Browse files Browse the repository at this point in the history
## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.
Fix Flaky Vulnerability Dashboard Test

(cherry picked from commit 4b8ba30)
  • Loading branch information
Omolola-Akinleye committed Jul 9, 2024
1 parent 208f33a commit 0f2b6ce
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,13 @@ export default function ({ getService }: FtrProviderContext) {

describe('Vulnerability Dashboard API', async () => {
beforeEach(async () => {
await index.removeFindings();
await index.removeScores();
await waitForPluginInitialized();
await index.addScores(scoresVulnerabilitiesMock);
await index.addFindings(vulnerabilitiesLatestMock);
});

afterEach(async () => {
await index.removeFindings();
await index.removeScores();
});

it('responds with a 200 status code and matching data mock', async () => {
const { body } = await supertest
.get(`/internal/cloud_security_posture/vulnerabilities_dashboard`)
Expand Down

0 comments on commit 0f2b6ce

Please sign in to comment.