Skip to content

Commit

Permalink
[8.10] [Security Solution] Fix flaky Event Filters test (#164473) (#1…
Browse files Browse the repository at this point in the history
…64550)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[Security Solution] Fix flaky Event Filters test
(#164473)](#164473)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Kevin
Logan","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-23T10:18:14Z","message":"[Security
Solution] Fix flaky Event Filters test (#164473)\n\n##
Summary\r\n\r\nFix flaky test for Event Filters and re-enable. Also,
needed to adjust a\r\nBlocklist test for a previous bugfix that was
missed because the suite\r\nwas skipped.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2952\r\n\r\nCloses:
https://github.com/elastic/kibana/issues/163140\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","sha":"2dc4e4301426fbf03f10ed98b1541e3d1a1839bc","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Defend
Workflows","v8.10.0","v8.11.0"],"number":164473,"url":"https://github.com/elastic/kibana/pull/164473","mergeCommit":{"message":"[Security
Solution] Fix flaky Event Filters test (#164473)\n\n##
Summary\r\n\r\nFix flaky test for Event Filters and re-enable. Also,
needed to adjust a\r\nBlocklist test for a previous bugfix that was
missed because the suite\r\nwas skipped.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2952\r\n\r\nCloses:
https://github.com/elastic/kibana/issues/163140\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","sha":"2dc4e4301426fbf03f10ed98b1541e3d1a1839bc"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164473","number":164473,"mergeCommit":{"message":"[Security
Solution] Fix flaky Event Filters test (#164473)\n\n##
Summary\r\n\r\nFix flaky test for Event Filters and re-enable. Also,
needed to adjust a\r\nBlocklist test for a previous bugfix that was
missed because the suite\r\nwas skipped.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2952\r\n\r\nCloses:
https://github.com/elastic/kibana/issues/163140\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","sha":"2dc4e4301426fbf03f10ed98b1541e3d1a1839bc"}}]}]
BACKPORT-->

Co-authored-by: Kevin Logan <[email protected]>
  • Loading branch information
kibanamachine and kevinlog authored Aug 23, 2023
1 parent 92e708f commit 5cefc39
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
};

for (const testData of getArtifactsListTestsData()) {
// FLAKY: https://github.com/elastic/kibana/issues/163140
describe.skip(`When on the ${testData.title} entries list`, function () {
describe(`When on the ${testData.title} entries list`, function () {
beforeEach(async () => {
policyInfo = await policyTestResources.createPolicy();
await removeAllArtifacts();
Expand Down
21 changes: 13 additions & 8 deletions x-pack/test/security_solution_endpoint/apps/integrations/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ export const getArtifactsListTestsData = () => [
type: 'click',
selector: 'fieldAutocompleteComboBox',
},
{
type: 'input',
selector: 'fieldAutocompleteComboBox',
value: 'agent.id',
},
{
type: 'customClick',
selector: 'button[title="agent.id"]',
Expand Down Expand Up @@ -402,7 +407,7 @@ export const getArtifactsListTestsData = () => [
},
{
type: 'click',
selector: 'blocklist-form-file.path',
selector: 'blocklist-form-file.path.caseless',
},
{
type: 'clear',
Expand Down Expand Up @@ -435,7 +440,7 @@ export const getArtifactsListTestsData = () => [
},
],
waitForValue:
'OSIS Windows\nAND file.pathIS ONE OF\nc:\\randomFolder\\randomFile.exe\nc:\\randomFolder\\randomFile2.exe',
'OSIS Windows\nAND file.path.caselessIS ONE OF\nc:\\randomFolder\\randomFile.exe\nc:\\randomFolder\\randomFile2.exe',
},
delete: {
confirmSelector: 'blocklistDeletionConfirm',
Expand Down Expand Up @@ -480,14 +485,14 @@ export const getArtifactsListTestsData = () => [
type: 'blocklist',
identifier: 'endpoint-blocklist-windows-v1',
relative_url:
'/api/fleet/artifacts/endpoint-blocklist-windows-v1/2df413b3c01b54be7e9106e92c39297ca72d32bcd626c3f7eb7d395db8e905fe',
body: 'eJx9jcEKwjAQRH9F9iwePOYD/IlWypKdYmCbhCSVltJ/dysieJE5zbxhZiPEVgIquW6jtmaQoxqmrKDzDxsDVAyOQXHJ3B7GU0bhlorFIXqdBWLpZwUL+zZ4rpCB42rgyTob6ci7vi8cJU23pILydcc2luP69K9zfZfu+6EXorpEbA==',
'/api/fleet/artifacts/endpoint-blocklist-windows-v1/3ead6ce4e34cb4411083a44bfe813d9442d296981ee8d56e727e6cff14dea0f0',
body: 'eJx9jUEKwzAQA79S9lx66NEP6CeSEhZboYaNbWynJIT8vetSArkUnaQR0kYINXsUMt1GdU0gQ8VPSUDXExs9xCkcveCWuL6Ux4TMNWaNfbAyOzhNfytY2NbBcoGglIHDquzNMivsyJq+zxxcnB5RHPLh2jyW9n7517l/S8+96QOI6kW/',
encryption_algorithm: 'none',
package_name: 'endpoint',
encoded_size: 130,
encoded_sha256: '3fb42b56c16ef38f8ecb62c082a7f3dddf4a52998a83c97d16688e854e15a502',
decoded_size: 194,
decoded_sha256: '2df413b3c01b54be7e9106e92c39297ca72d32bcd626c3f7eb7d395db8e905fe',
encoded_size: 132,
encoded_sha256: '9f81934389ff29599c0b0f16aa91b9f5cebd95d51271a47ea469662a61a29884',
decoded_size: 197,
decoded_sha256: '3ead6ce4e34cb4411083a44bfe813d9442d296981ee8d56e727e6cff14dea0f0',
compression_algorithm: 'zlib',
created: '2000-01-01T00:00:00.000Z',
}),
Expand Down

0 comments on commit 5cefc39

Please sign in to comment.