Skip to content

Commit

Permalink
[Cloud Security] fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
CohenIdo authored Mar 5, 2024
1 parent f4bb26d commit 15cdcf2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ const disableDetectionRules = async (
): Promise<string[]> => {
const detectionRulesIdsToDisable = await getDetectionRuleIdsToDisable(detectionRules);
if (!detectionRulesIdsToDisable.length) return [];
await detectionRulesClient.bulkDisableRules({ ids: detectionRulesIdsToDisable });
return detectionRulesIdsToDisable;
const uniqueDetectionRulesIdsToDisable = [...new Set(detectionRulesIdsToDisable)]; // Prevent muting the same rule twice.
await detectionRulesClient.bulkDisableRules({ ids: uniqueDetectionRulesIdsToDisable });
return uniqueDetectionRulesIdsToDisable;
};

export const getDetectionRules = async (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ export default function ({ getService }: FtrProviderContext) {
log.debug('CSP plugin is initialized');
});

// Failing: See https://github.com/elastic/kibana/issues/174204
describe.skip('Verify update csp rules states API', async () => {
describe('Verify update csp rules states API', async () => {
before(async () => {
await waitForPluginInitialized();
});
Expand Down

0 comments on commit 15cdcf2

Please sign in to comment.