Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Split detection_engine_api_integration rule exception list tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brianseeders committed Apr 28, 2022
1 parent da1aa12 commit 9205afb
Show file tree
Hide file tree
Showing 30 changed files with 139 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,30 @@ The tests take a while so they have been broken up into groups with their own `c

Want to change the groups to something more logical? Have fun! Just make sure that each group executes on CI in less than 10 minutes or so. We don't currently have any mechanism for validating this right now, you just need to look at the times in the log output on CI, but we'll be working on tooling for making this information more accessible soon.

- Kibana Operations
- Kibana Operations

# Rule Exception List Tests

These tests are currently in group7-9.

These are tests for rule exception lists where we test each data type

- date
- double
- float
- integer
- ip
- keyword
- long
- text

Against the operator types of:

- "is"
- "is not"
- "is one of"
- "is not one of"
- "exists"
- "does not exist"
- "is in list"
- "is not in list"

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ import { FtrProviderContext } from '../../common/ftr_provider_context';
// eslint-disable-next-line import/no-default-export
export default ({ loadTestFile }: FtrProviderContext): void => {
describe('detection engine api security and spaces enabled - group 4', function () {
loadTestFile(require.resolve('./exception_operators_data_types'));
loadTestFile(require.resolve('./telemetry'));
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrProviderContext } from '../../../common/ftr_provider_context';

// eslint-disable-next-line import/no-default-export
export default ({ loadTestFile }: FtrProviderContext): void => {
describe('Detection exceptions data types and operators', function () {
describe('', function () {
this.tags('ciGroup23');

loadTestFile(require.resolve('./date'));
loadTestFile(require.resolve('./double'));
loadTestFile(require.resolve('./float'));
loadTestFile(require.resolve('./integer'));
});
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ import { FtrProviderContext } from '../../common/ftr_provider_context';
// eslint-disable-next-line import/no-default-export
export default ({ loadTestFile }: FtrProviderContext): void => {
describe('detection engine api security and spaces enabled - group 7', function () {
loadTestFile(require.resolve('./telemetry'));
loadTestFile(require.resolve('./exception_operators_data_types'));
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrConfigProviderContext } from '@kbn/test';

// eslint-disable-next-line import/no-default-export
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const functionalConfig = await readConfigFile(require.resolve('../config.base.ts'));

return {
...functionalConfig.getAll(),
testFiles: [require.resolve('.')],
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrProviderContext } from '../../../common/ftr_provider_context';

// eslint-disable-next-line import/no-default-export
export default ({ loadTestFile }: FtrProviderContext): void => {
describe('Detection exceptions data types and operators', function () {
describe('', function () {
this.tags('ciGroup24');

loadTestFile(require.resolve('./keyword'));
loadTestFile(require.resolve('./keyword_array'));
loadTestFile(require.resolve('./long'));
loadTestFile(require.resolve('./text'));
});
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrProviderContext } from '../../common/ftr_provider_context';

// eslint-disable-next-line import/no-default-export
export default ({ loadTestFile }: FtrProviderContext): void => {
describe('detection engine api security and spaces enabled - group 8', function () {
loadTestFile(require.resolve('./exception_operators_data_types'));
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrConfigProviderContext } from '@kbn/test';

// eslint-disable-next-line import/no-default-export
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
const functionalConfig = await readConfigFile(require.resolve('../config.base.ts'));

return {
...functionalConfig.getAll(),
testFiles: [require.resolve('.')],
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,9 @@ import { FtrProviderContext } from '../../../common/ftr_provider_context';
// eslint-disable-next-line import/no-default-export
export default ({ loadTestFile }: FtrProviderContext): void => {
describe('Detection exceptions data types and operators', function () {
describe('', function () {
this.tags('ciGroup23');

loadTestFile(require.resolve('./date'));
loadTestFile(require.resolve('./double'));
loadTestFile(require.resolve('./float'));
loadTestFile(require.resolve('./integer'));
});

describe('', function () {
this.tags('ciGroup24');

loadTestFile(require.resolve('./keyword'));
loadTestFile(require.resolve('./keyword_array'));
loadTestFile(require.resolve('./long'));
loadTestFile(require.resolve('./text'));
loadTestFile(require.resolve('./text_array'));
});

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { FtrProviderContext } from '../../common/ftr_provider_context';

// eslint-disable-next-line import/no-default-export
export default ({ loadTestFile }: FtrProviderContext): void => {
describe('detection engine api security and spaces enabled - group 9', function () {
loadTestFile(require.resolve('./exception_operators_data_types'));
});
};

0 comments on commit 9205afb

Please sign in to comment.