Skip to content

Commit 89c1db9

Browse files
Fixed the integeration tests to work and not flake out on version changes
1 parent 5923ebc commit 89c1db9

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_ml.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
deleteListsIndex,
2424
importFile,
2525
} from '../../../lists_api_integration/utils';
26+
import { SIGNALS_TEMPLATE_VERSION } from '../../../../plugins/security_solution/server/lib/detection_engine/routes/index/get_signals_template';
2627

2728
// eslint-disable-next-line import/no-default-export
2829
export default ({ getService }: FtrProviderContext) => {
@@ -127,7 +128,7 @@ export default ({ getService }: FtrProviderContext) => {
127128
host: { name: ['mothra'] },
128129
event: { kind: 'signal' },
129130
signal: {
130-
_meta: { version: 35 },
131+
_meta: { version: SIGNALS_TEMPLATE_VERSION },
131132
parents: [
132133
{
133134
id:

x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_threat_matching.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {
2727

2828
import { getCreateThreatMatchRulesSchemaMock } from '../../../../plugins/security_solution/common/detection_engine/schemas/request/rule_schemas.mock';
2929
import { getThreatMatchingSchemaPartialMock } from '../../../../plugins/security_solution/common/detection_engine/schemas/response/rules_schema.mocks';
30+
import { SIGNALS_TEMPLATE_VERSION } from '../../../../plugins/security_solution/server/lib/detection_engine/routes/index/get_signals_template';
3031

3132
const format = (value: unknown): string => JSON.stringify(value, null, 2);
3233

@@ -201,7 +202,7 @@ export default ({ getService }: FtrProviderContext) => {
201202
},
202203
signal: {
203204
_meta: {
204-
version: 35,
205+
version: SIGNALS_TEMPLATE_VERSION,
205206
},
206207
ancestors: [
207208
{

x-pack/test/detection_engine_api_integration/security_and_spaces/tests/generating_signals.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ export default ({ getService }: FtrProviderContext) => {
853853
'host.id': '8cc95778cce5407c809480e8e32ad76b',
854854
event: { kind: 'signal' },
855855
signal: {
856-
_meta: { version: 35 },
856+
_meta: { version: SIGNALS_TEMPLATE_VERSION },
857857
parents: [
858858
{
859859
depth: 0,
@@ -1011,7 +1011,7 @@ export default ({ getService }: FtrProviderContext) => {
10111011
'host.id': '8cc95778cce5407c809480e8e32ad76b',
10121012
event: { kind: 'signal' },
10131013
signal: {
1014-
_meta: { version: 35 },
1014+
_meta: { version: SIGNALS_TEMPLATE_VERSION },
10151015
parents: [
10161016
{
10171017
depth: 0,
@@ -1101,7 +1101,7 @@ export default ({ getService }: FtrProviderContext) => {
11011101
'process.name': 'sshd',
11021102
event: { kind: 'signal' },
11031103
signal: {
1104-
_meta: { version: 35 },
1104+
_meta: { version: SIGNALS_TEMPLATE_VERSION },
11051105
parents: [
11061106
{
11071107
depth: 0,

0 commit comments

Comments
 (0)