Skip to content

Commit

Permalink
[Security Solution][Detection Engine] enables Cypress and FTR tests f…
Browse files Browse the repository at this point in the history
…or ES|QL rule type on serverless (#182789)

## Summary
- addresses #181937
- enables Cypress and FTR tests for ES|QL rule type on serverless

- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
Cypress ES|QL tests(x100):
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5881
FTR(x100):
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5875
  • Loading branch information
vitaliidm authored May 29, 2024
1 parent 9e2b401 commit 75e0b3b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export default ({ getService }: FtrProviderContext) => {
const es = getService('es');
const log = getService('log');
const kibanaServer = getService('kibanaServer');
const config = getService('config');
const ELASTICSEARCH_USERNAME = config.get('servers.kibana.username');

const { indexEnhancedDocuments, indexListOfDocuments, indexGeneratedDocuments } =
dataGeneratorFactory({
es,
Expand All @@ -49,7 +52,7 @@ export default ({ getService }: FtrProviderContext) => {
*/
const internalIdPipe = (id: string) => `| where id=="${id}"`;

describe('@ess ES|QL rule type', () => {
describe('@ess @serverless ES|QL rule type', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/security_solution/ecs_compliant');
});
Expand Down Expand Up @@ -137,7 +140,7 @@ export default ({ getService }: FtrProviderContext) => {
'kibana.alert.risk_score': 55,
'kibana.alert.rule.actions': [],
'kibana.alert.rule.author': [],
'kibana.alert.rule.created_by': 'elastic',
'kibana.alert.rule.created_by': ELASTICSEARCH_USERNAME,
'kibana.alert.rule.description': 'Detecting root and admin users',
'kibana.alert.rule.enabled': true,
'kibana.alert.rule.exceptions_list': [],
Expand All @@ -154,7 +157,7 @@ export default ({ getService }: FtrProviderContext) => {
'kibana.alert.rule.threat': [],
'kibana.alert.rule.to': 'now',
'kibana.alert.rule.type': 'esql',
'kibana.alert.rule.updated_by': 'elastic',
'kibana.alert.rule.updated_by': ELASTICSEARCH_USERNAME,
'kibana.alert.rule.version': 1,
'kibana.alert.workflow_tags': [],
'kibana.alert.workflow_assignee_ids': [],
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { visit } from '../../../../tasks/navigation';

import { ruleDetailsUrl } from '../../../../urls/rule_details';

describe('Detection ES|QL rules, details view', { tags: ['@ess'] }, () => {
describe('Detection ES|QL rules, details view', { tags: ['@ess', '@serverless'] }, () => {
const rule = getEsqlRule();

beforeEach(() => {
Expand Down

0 comments on commit 75e0b3b

Please sign in to comment.