Split detection_engine_api_integration rule exception list tests

This commit is contained in:
Brian Seeders 2022-04-28 15:42:32 -04:00
parent da1aa12a1e
commit 9205afb44b
No known key found for this signature in database
GPG key ID: 9E3CEF9108510E88
30 changed files with 139 additions and 37 deletions

View file

@ -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"

View file

@ -1,21 +0,0 @@
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"
If you add a test here, ensure you add it to the ./index.ts" file as well

View file

@ -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'));
});
};

View file

@ -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'));
});
});
};

View file

@ -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'));
});
};

View file

@ -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('.')],
};
}

View file

@ -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'));
});
});
};

View file

@ -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'));
});
};

View file

@ -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('.')],
};
}

View file

@ -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'));
});

View file

@ -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'));
});
};