Skip to content

Commit

Permalink
[Detection Engine] Skips tests in MKI environments (elastic#187628)
Browse files Browse the repository at this point in the history
## Summary

Skips failing tests in MKI environments.
  • Loading branch information
MadameSheema authored Jul 6, 2024
1 parent e6f17e7 commit bb9ce21
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,27 @@ describe('Saved query rules', { tags: ['@ess', '@serverless'] }, () => {
cy.get(TOASTER).should('contain', FAILED_TO_LOAD_ERROR);
});

it('Allows to update saved_query rule with non-existent query', () => {
cy.get(LOAD_QUERY_DYNAMICALLY_CHECKBOX).should('exist');

cy.intercept('PUT', '/api/detection_engine/rules').as('editedRule');
saveEditedRule();

cy.wait('@editedRule').then(({ response }) => {
// updated rule type shouldn't change
cy.wrap(response?.body.type).should('equal', 'saved_query');
});

cy.get(DEFINE_RULE_PANEL_PROGRESS).should('not.exist');

assertDetailsNotExist(SAVED_QUERY_NAME_DETAILS);
assertDetailsNotExist(SAVED_QUERY_DETAILS);
});
// https://github.com/elastic/kibana/issues/187623
it(
'Allows to update saved_query rule with non-existent query',
{ tags: ['@skipInServerlessMKI'] },
() => {
cy.get(LOAD_QUERY_DYNAMICALLY_CHECKBOX).should('exist');

cy.intercept('PUT', '/api/detection_engine/rules').as('editedRule');
saveEditedRule();

cy.wait('@editedRule').then(({ response }) => {
// updated rule type shouldn't change
cy.wrap(response?.body.type).should('equal', 'saved_query');
});

cy.get(DEFINE_RULE_PANEL_PROGRESS).should('not.exist');

assertDetailsNotExist(SAVED_QUERY_NAME_DETAILS);
assertDetailsNotExist(SAVED_QUERY_DETAILS);
}
);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ import { CREATE_RULE_URL } from '../../../../urls/navigation';
import { forceStopAndCloseJob } from '../../../../support/machine_learning';
import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common';

describe('Machine Learning rules', { tags: ['@ess', '@serverless'] }, () => {
// https://github.com/elastic/kibana/issues/187622
describe('Machine Learning rules', { tags: ['@ess', '@serverless, @skipInServerlessMKI'] }, () => {
const expectedUrls = (getMachineLearningRule().references ?? []).join('');
const expectedFalsePositives = (getMachineLearningRule().false_positives ?? []).join('');
const expectedTags = (getMachineLearningRule().tags ?? []).join('');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ describe(
login();
deleteAlertsAndRules();
});
describe('without suppression', () => {

// https://github.com/elastic/kibana/issues/187621
describe('without suppression', { tags: ['@skipInServerlessMKI'] }, () => {
beforeEach(() => {
createRule(rule);
});
Expand Down

0 comments on commit bb9ce21

Please sign in to comment.