Skip to content

[Cloud Security] Refactoring, removed duplicated code from tests#195492

Merged
kfirpeled merged 1 commit intoelastic:mainfrom
kfirpeled:cspm/refactor_api_test_utils
Oct 8, 2024
Merged

[Cloud Security] Refactoring, removed duplicated code from tests#195492
kfirpeled merged 1 commit intoelastic:mainfrom
kfirpeled:cspm/refactor_api_test_utils

Conversation

@kfirpeled
Copy link
Copy Markdown
Contributor

@kfirpeled kfirpeled commented Oct 8, 2024

Summary

Removed duplicated code cloud_security_posture_api_integration tests folder

Checklist

@kfirpeled kfirpeled requested a review from a team as a code owner October 8, 2024 19:21
@kfirpeled kfirpeled added release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor labels Oct 8, 2024
@kfirpeled kfirpeled enabled auto-merge (squash) October 8, 2024 20:03
@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7110

[✅] x-pack/test/cloud_security_posture_api/config.ts: 25/25 tests passed.

see run history

Copy link
Copy Markdown
Contributor

@opauloh opauloh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

* Checks if plugin initialization was done
* Required before indexing findings
*/
export const waitForPluginInitialized = ({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice enhancement, for the future I guess we can pass only the provider context and retrieve the parameters from it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, sometimes you want them to have the same instance being passed, this approach provides that.

@kfirpeled kfirpeled merged commit 776f05a into elastic:main Oct 8, 2024
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11243585320

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
@kbn/test-suites-xpack 722 723 +1

Total ESLint disabled count

id before after diff
@kbn/test-suites-xpack 746 747 +1

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 8, 2024
…stic#195492)

## Summary

Removed duplicated code cloud_security_posture_api_integration tests
folder

### Checklist

- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

(cherry picked from commit 776f05a)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 8, 2024
#195492) (#195506)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Cloud Security] Refactoring, removed duplicated code from tests
(#195492)](#195492)

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

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

<!--BACKPORT [{"author":{"name":"Kfir
Peled","email":"61654899+kfirpeled@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-08T20:55:04Z","message":"[Cloud
Security] Refactoring, removed duplicated code from tests
(#195492)\n\n## Summary\r\n\r\nRemoved duplicated code
cloud_security_posture_api_integration tests\r\nfolder\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"776f05a1b017d333f33ccd915c7fbc2a81e838fd","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor"],"title":"[Cloud
Security] Refactoring, removed duplicated code from
tests","number":195492,"url":"https://github.com/elastic/kibana/pull/195492","mergeCommit":{"message":"[Cloud
Security] Refactoring, removed duplicated code from tests
(#195492)\n\n## Summary\r\n\r\nRemoved duplicated code
cloud_security_posture_api_integration tests\r\nfolder\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"776f05a1b017d333f33ccd915c7fbc2a81e838fd"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195492","number":195492,"mergeCommit":{"message":"[Cloud
Security] Refactoring, removed duplicated code from tests
(#195492)\n\n## Summary\r\n\r\nRemoved duplicated code
cloud_security_posture_api_integration tests\r\nfolder\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests
changed","sha":"776f05a1b017d333f33ccd915c7fbc2a81e838fd"}}]}]
BACKPORT-->

Co-authored-by: Kfir Peled <61654899+kfirpeled@users.noreply.github.com>
@bhavyarm bhavyarm added the Team:Cloud Security Cloud Security team related label Oct 18, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related v8.16.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants