[8.12] [Security Solution][Endpoint] Re-enable execute api integration tests (#175082) (#175123)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[Security Solution][Endpoint] Re-enable execute api integration tests
(#175082)](https://github.com/elastic/kibana/pull/175082)

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

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

<!--BACKPORT
[{"author":{"name":"Ash","email":"1849116+ashokaditya@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-01-18T14:52:30Z","message":"[Security
Solution][Endpoint] Re-enable execute api integration tests
(#175082)\n\n## Summary\r\n\r\nRe-enable `execute` api integration
tests\r\n\r\ncloses elastic/kibana/issues/171666\r\ncloses
elastic/kibana/issues/171667\r\n\r\n### Flaky
runner\r\n-\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4904\r\nx
100 ( all pass )\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"05a6ba5dd6348a04b518e6327c6c88897b71757e","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Defend
Workflows","OLM Sprint","v8.12.1","v8.13.0"],"title":"[Security
Solution][Endpoint] Re-enable execute api integration
tests","number":175082,"url":"https://github.com/elastic/kibana/pull/175082","mergeCommit":{"message":"[Security
Solution][Endpoint] Re-enable execute api integration tests
(#175082)\n\n## Summary\r\n\r\nRe-enable `execute` api integration
tests\r\n\r\ncloses elastic/kibana/issues/171666\r\ncloses
elastic/kibana/issues/171667\r\n\r\n### Flaky
runner\r\n-\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4904\r\nx
100 ( all pass )\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"05a6ba5dd6348a04b518e6327c6c88897b71757e"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/175082","number":175082,"mergeCommit":{"message":"[Security
Solution][Endpoint] Re-enable execute api integration tests
(#175082)\n\n## Summary\r\n\r\nRe-enable `execute` api integration
tests\r\n\r\ncloses elastic/kibana/issues/171666\r\ncloses
elastic/kibana/issues/171667\r\n\r\n### Flaky
runner\r\n-\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4904\r\nx
100 ( all pass )\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"05a6ba5dd6348a04b518e6327c6c88897b71757e"}}]}]
BACKPORT-->

Co-authored-by: Ash <1849116+ashokaditya@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2024-01-18 11:06:11 -05:00 committed by GitHub
parent eee3c46954
commit f98d9d3c55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,8 +16,6 @@ export default function ({ getService }: FtrProviderContext) {
const supertestWithoutAuth = getService('supertestWithoutAuth');
const endpointTestResources = getService('endpointTestResources');
// FLAKY: https://github.com/elastic/kibana/issues/171666
// FLAKY: https://github.com/elastic/kibana/issues/171667
describe('Endpoint `execute` response action', function () {
targetTags(this, ['@ess', '@serverless']);
@ -30,7 +28,9 @@ export default function ({ getService }: FtrProviderContext) {
});
after(async () => {
await endpointTestResources.unloadEndpointData(indexedData);
if (indexedData) {
await endpointTestResources.unloadEndpointData(indexedData);
}
});
it('should not allow `execute` action without required privilege', async () => {