Skip to content

Commit

Permalink
all but threhold ess basic tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
yctercero committed Apr 9, 2024
1 parent 9d2c085 commit dd39661
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export default createTestConfig({
testFiles: [require.resolve('..')],
junit: {
reportName:
'Detection Engine - Rule Execution Logic Integration Tests - Serverless Env - Essentials License ',
'Detection Engine - Rule Execution Logic Integration Tests - Serverless Env - Essentials Tier ',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export default ({ getService }: FtrProviderContext): void => {
* server/lib/detection_engine/signals/source_fields_merging/utils/is_ignored.ts
* server/lib/detection_engine/signals/source_fields_merging/utils/is_eql_bug_77152.ts
*/

// TODO: Fix for serverless - https://github.com/elastic/kibana/issues/179767
describe('@ess @serverless @brokenInServerless ignore_fields', () => {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default ({ loadTestFile }: FtrProviderContext): void => {
loadTestFile(require.resolve('./query'));
loadTestFile(require.resolve('./query_ess'));
loadTestFile(require.resolve('./saved_query'));
loadTestFile(require.resolve('./threshold'));
loadTestFile(require.resolve('./threat_match'));
loadTestFile(require.resolve('./threshold'));
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ export default ({ getService }: FtrProviderContext) => {
return testId;
};

// Failing: See https://github.com/elastic/kibana/issues/180236
describe.skip('@ess @serverless New terms type rules', () => {
describe('@ess @serverless New terms type rules', () => {
before(async () => {
await esArchiver.load(path);
await esArchiver.load('x-pack/test/functional/es_archives/security_solution/new_terms');
Expand All @@ -101,12 +100,13 @@ export default ({ getService }: FtrProviderContext) => {
await deleteAllRules(supertest, log);
});

// Failing: See https://github.com/elastic/kibana/issues/180236
// First test creates a real rule - remaining tests use preview API

// This test also tests that alerts are NOT created for terms that are not new: the host name
// suricata-sensor-san-francisco appears in a document at 2019-02-19T20:42:08.230Z, but also appears
// in earlier documents so is not new. An alert should not be generated for that term.
it('should generate 1 alert with 1 selected field', async () => {
it.skip('should generate 1 alert with 1 selected field', async () => {
const rule: NewTermsRuleCreateProps = {
...getCreateNewTermsRulesSchemaMock('rule-1', true),
new_terms_fields: ['host.name'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ export default ({ getService }: FtrProviderContext) => {
describe('@ess @serverless Query type rules', () => {
before(async () => {
await esArchiver.load(auditbeatPath);
// await esArchiver.load('x-pack/test/functional/es_archives/security_solution/alerts/8.8.0', {
// useCreate: true,
// docsOnly: true,
// });
await esArchiver.load('x-pack/test/functional/es_archives/signals/severity_risk_overrides');
});

Expand All @@ -93,7 +89,6 @@ export default ({ getService }: FtrProviderContext) => {
after(async () => {
await esArchiver.unload(auditbeatPath);
await esArchiver.unload('x-pack/test/functional/es_archives/signals/severity_risk_overrides');
// await esArchiver.unload('x-pack/test/functional/es_archives/security_solution/alerts/8.8.0');
});

// First test creates a real rule - most remaining tests use preview API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ import {
} from '@kbn/security-solution-plugin/common/field_maps/field_names';
import { getMaxSignalsWarning as getMaxAlertsWarning } from '@kbn/security-solution-plugin/server/lib/detection_engine/rule_types/utils/utils';
import { ENABLE_ASSET_CRITICALITY_SETTING } from '@kbn/security-solution-plugin/common/constants';
import {
createRule,
deleteAllAlerts,
deleteAllRules,
} from '../../../../../../../common/utils/security_solution';
import { createRule, deleteAllAlerts } from '../../../../../../../common/utils/security_solution';
import {
getOpenAlerts,
getPreviewAlerts,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export default ({ getService }: FtrProviderContext) => {
});
});

// TODO add ticket about it failing
// TODO: https://github.com/elastic/kibana/issues/179768
describe.skip('with asset criticality', async () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/asset_criticality');
Expand Down

0 comments on commit dd39661

Please sign in to comment.