Skip to content

Commit

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

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Cloud Security] fix vulnerability dashboard ftr flaky test
(#187790)](#187790)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Lola","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-09T19:21:19Z","message":"[Cloud
Security] fix vulnerability dashboard ftr flaky test (#187790)\n\n##
Summary\r\n\r\nSummarize your PR. If it involves visual changes include
a screenshot or\r\ngif.\r\nFix Flaky Vulnerability Dashboard
Test","sha":"4b8ba30dd429131a280ec7df9bf21a02480063a4","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Cloud
Security","v8.15.0","v8.16.0"],"title":"[Cloud Security] fix
vulnerability dashboard ftr flaky
test","number":187790,"url":"https://github.com/elastic/kibana/pull/187790","mergeCommit":{"message":"[Cloud
Security] fix vulnerability dashboard ftr flaky test (#187790)\n\n##
Summary\r\n\r\nSummarize your PR. If it involves visual changes include
a screenshot or\r\ngif.\r\nFix Flaky Vulnerability Dashboard
Test","sha":"4b8ba30dd429131a280ec7df9bf21a02480063a4"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/187790","number":187790,"mergeCommit":{"message":"[Cloud
Security] fix vulnerability dashboard ftr flaky test (#187790)\n\n##
Summary\r\n\r\nSummarize your PR. If it involves visual changes include
a screenshot or\r\ngif.\r\nFix Flaky Vulnerability Dashboard
Test","sha":"4b8ba30dd429131a280ec7df9bf21a02480063a4"}}]}] BACKPORT-->

Co-authored-by: Lola <[email protected]>
  • Loading branch information
kibanamachine and Omolola-Akinleye authored Jul 9, 2024
1 parent d9269b6 commit 1e231f8
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 1e231f8

Please sign in to comment.