Skip to content

Commit 3fd4837

Browse files
committed
[Security Solution] Updates loock-back time on Cypress tests (#110609)
* updates loock-back time * updates loock-back value for 'expectedExportedRule'
1 parent 7aeaaf7 commit 3fd4837

File tree

2 files changed

+5
-5
lines changed
  • x-pack/plugins/security_solution/cypress

2 files changed

+5
-5
lines changed

x-pack/plugins/security_solution/cypress/objects/rule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const getRunsEvery = (): Interval => ({
164164
});
165165

166166
const getLookBack = (): Interval => ({
167-
interval: '17520',
167+
interval: '50000',
168168
timeType: 'Hours',
169169
type: 'h',
170170
});
@@ -382,5 +382,5 @@ export const getEditedRule = (): CustomRule => ({
382382
export const expectedExportedRule = (ruleResponse: Cypress.Response): string => {
383383
const jsonrule = ruleResponse.body;
384384

385-
return `{"id":"${jsonrule.id}","updated_at":"${jsonrule.updated_at}","updated_by":"elastic","created_at":"${jsonrule.created_at}","created_by":"elastic","name":"${jsonrule.name}","tags":[],"interval":"100m","enabled":false,"description":"${jsonrule.description}","risk_score":${jsonrule.risk_score},"severity":"${jsonrule.severity}","output_index":".siem-signals-default","author":[],"false_positives":[],"from":"now-17520h","rule_id":"rule_testing","max_signals":100,"risk_score_mapping":[],"severity_mapping":[],"threat":[],"to":"now","references":[],"version":1,"exceptions_list":[],"immutable":false,"type":"query","language":"kuery","index":["exceptions-*"],"query":"${jsonrule.query}","throttle":"no_actions","actions":[]}\n{"exported_count":1,"missing_rules":[],"missing_rules_count":0}\n`;
385+
return `{"id":"${jsonrule.id}","updated_at":"${jsonrule.updated_at}","updated_by":"elastic","created_at":"${jsonrule.created_at}","created_by":"elastic","name":"${jsonrule.name}","tags":[],"interval":"100m","enabled":false,"description":"${jsonrule.description}","risk_score":${jsonrule.risk_score},"severity":"${jsonrule.severity}","output_index":".siem-signals-default","author":[],"false_positives":[],"from":"now-50000h","rule_id":"rule_testing","max_signals":100,"risk_score_mapping":[],"severity_mapping":[],"threat":[],"to":"now","references":[],"version":1,"exceptions_list":[],"immutable":false,"type":"query","language":"kuery","index":["exceptions-*"],"query":"${jsonrule.query}","throttle":"no_actions","actions":[]}\n{"exported_count":1,"missing_rules":[],"missing_rules_count":0}\n`;
386386
};

x-pack/plugins/security_solution/cypress/tasks/api_calls/rules.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const createCustomRule = (rule: CustomRule, ruleId = 'rule_testing', inte
1919
name: rule.name,
2020
severity: rule.severity.toLocaleLowerCase(),
2121
type: 'query',
22-
from: 'now-17520h',
22+
from: 'now-50000h',
2323
index: ['exceptions-*'],
2424
query: rule.customQuery,
2525
language: 'kuery',
@@ -59,7 +59,7 @@ export const createCustomIndicatorRule = (rule: ThreatIndicatorRule, ruleId = 'r
5959
threat_filters: [],
6060
threat_index: rule.indicatorIndexPattern,
6161
threat_indicator_path: '',
62-
from: 'now-17520h',
62+
from: 'now-50000h',
6363
index: rule.index,
6464
query: rule.customQuery || '*:*',
6565
language: 'kuery',
@@ -86,7 +86,7 @@ export const createCustomRuleActivated = (
8686
name: rule.name,
8787
severity: rule.severity.toLocaleLowerCase(),
8888
type: 'query',
89-
from: 'now-17520h',
89+
from: 'now-50000h',
9090
index: rule.index,
9191
query: rule.customQuery,
9292
language: 'kuery',

0 commit comments

Comments
 (0)