Skip to content

Commit

Permalink
Update the rule to the new (remote) data
Browse files Browse the repository at this point in the history
  • Loading branch information
cavokz committed Jun 3, 2021
1 parent d637e60 commit e5bbeea
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions x-pack/test/stack_functional_integration/apps/ccs/ccs_discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export default ({ getService, getPageObjects }) => {
log.debug('id: ' + signalsId);
});

before('Prepare data:.monitoring-es-*', async function () {
before('Prepare data:metricbeat-*', async function () {
log.info('Create index');
await esArchiver.load('metricbeat');

Expand All @@ -271,8 +271,7 @@ export default ({ getService, getPageObjects }) => {
.set('kbn-xsrf', 'true')
.send({
index_pattern: {
title: 'data:.monitoring-es-*',
timeFieldName: 'timestamp',
title: 'data:metricbeat-*',
},
override: true,
})
Expand All @@ -292,10 +291,9 @@ export default ({ getService, getPageObjects }) => {
interval: '10s',
name: 'CCS_Detection_test',
type: 'query',
from: 'now-1d',
index: ['data:.monitoring-es-*'],
timestamp_override: 'timestamp',
query: 'type:shards',
from: 'now-1y',
index: ['data:metricbeat-*'],
query: '*:*',
language: 'kuery',
enabled: true,
})
Expand All @@ -314,7 +312,7 @@ export default ({ getService, getPageObjects }) => {
}
});

after('Clean up data:.monitoring-es-*', async function () {
after('Clean up data:metricbeat-*', async function () {
if (dataId !== undefined) {
log.info('Delete index pattern');
log.debug('id: ' + dataId);
Expand Down Expand Up @@ -351,10 +349,10 @@ export default ({ getService, getPageObjects }) => {
log.info('Check if any alert got to .siem-signals-*');
await PageObjects.common.navigateToApp('discover', { insertTimestamp: false });
await PageObjects.discover.selectIndexPattern('.siem-signals-*');
await retry.tryForTime(40000, async () => {
await retry.tryForTime(30000, async () => {
const hitCount = await PageObjects.discover.getHitCount();
log.debug('### hit count = ' + hitCount);
expect(hitCount).to.be.greaterThan('0');
expect(hitCount).to.be('100');
});
});
});
Expand Down

0 comments on commit e5bbeea

Please sign in to comment.