mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Security Solution][Endpoint] Fix and unskip flaky test (#165466)
## Summary Fixes and un-skips a test. Ensures that the test data doesn't create an existing index. If it still does, as a temp. measure we're dismissing the error toast that is blocking the button so the rest of the test can continue. closes elastic/kibana/issues/139260 **flakey test runner** https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3036 x 200 ( all green) ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
This commit is contained in:
parent
ccabaa8e9d
commit
ada6671165
2 changed files with 14 additions and 7 deletions
|
@ -127,14 +127,17 @@ const ensureEndpointRuleAlertsIndexExists = async (esClient: Client): Promise<vo
|
|||
indexMappings.mappings._meta.kibana.version = kibanaPackageJson.version;
|
||||
}
|
||||
|
||||
const doesIndexExist = await esClient.indices.exists({ index: indexMappings.index });
|
||||
|
||||
if (doesIndexExist) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await esClient.indices.create({
|
||||
index: indexMappings.index,
|
||||
body: {
|
||||
settings: indexMappings.settings,
|
||||
mappings: indexMappings.mappings,
|
||||
aliases: indexMappings.aliases,
|
||||
},
|
||||
settings: indexMappings.settings,
|
||||
mappings: indexMappings.mappings,
|
||||
aliases: indexMappings.aliases,
|
||||
});
|
||||
} catch (error) {
|
||||
// ignore error that indicate index is already created
|
||||
|
|
|
@ -81,8 +81,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
);
|
||||
};
|
||||
|
||||
// Failing: See https://github.com/elastic/kibana/issues/139260
|
||||
describe.skip('Response Actions Responder', function () {
|
||||
describe('Response Actions Responder', function () {
|
||||
let indexedData: IndexedHostsAndAlertsResponse;
|
||||
let endpointAgentId: string;
|
||||
|
||||
|
@ -183,6 +182,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
|
|||
// Show event/alert details for the first one in the list
|
||||
await pageObjects.timeline.showEventDetails();
|
||||
|
||||
// TODO: The index already exists error toast should not show up
|
||||
// close and dismiss it if it does
|
||||
if (await testSubjects.exists('globalToastList')) {
|
||||
await testSubjects.click('toastCloseButton');
|
||||
}
|
||||
// Click responder from the take action button
|
||||
await testSubjects.click('take-action-dropdown-btn');
|
||||
await testSubjects.clickWhenNotDisabled('endpointResponseActions-action-item');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue