mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
[Security Solution] response action entity_id number -> string (#135037)
This commit is contained in:
parent
61b5349d95
commit
acfd0517a2
4 changed files with 6 additions and 6 deletions
|
@ -213,7 +213,7 @@ describe('actions schemas', () => {
|
||||||
KillOrSuspendProcessRequestSchema.body.validate({
|
KillOrSuspendProcessRequestSchema.body.validate({
|
||||||
endpoint_ids: ['ABC-XYZ-000'],
|
endpoint_ids: ['ABC-XYZ-000'],
|
||||||
parameters: {
|
parameters: {
|
||||||
entity_id: 5678,
|
entity_id: 'abc123',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}).not.toThrow();
|
}).not.toThrow();
|
||||||
|
@ -225,7 +225,7 @@ describe('actions schemas', () => {
|
||||||
endpoint_ids: ['ABC-XYZ-000'],
|
endpoint_ids: ['ABC-XYZ-000'],
|
||||||
parameters: {
|
parameters: {
|
||||||
pid: 1234,
|
pid: 1234,
|
||||||
entity_id: 5678,
|
entity_id: 'abc123',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}).toThrow();
|
}).toThrow();
|
||||||
|
|
|
@ -27,7 +27,7 @@ export const KillOrSuspendProcessRequestSchema = {
|
||||||
...BaseActionRequestSchema,
|
...BaseActionRequestSchema,
|
||||||
parameters: schema.oneOf([
|
parameters: schema.oneOf([
|
||||||
schema.object({ pid: schema.number({ min: 1 }) }),
|
schema.object({ pid: schema.number({ min: 1 }) }),
|
||||||
schema.object({ entity_id: schema.number({ min: 1 }) }),
|
schema.object({ entity_id: schema.string({ minLength: 1 }) }),
|
||||||
]),
|
]),
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
|
@ -87,7 +87,7 @@ interface ResponseActionParametersWithPid {
|
||||||
|
|
||||||
interface ResponseActionParametersWithEntityId {
|
interface ResponseActionParametersWithEntityId {
|
||||||
pid?: never;
|
pid?: never;
|
||||||
entity_id: number;
|
entity_id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ResponseActionParametersWithPidOrEntityId =
|
export type ResponseActionParametersWithPidOrEntityId =
|
||||||
|
|
|
@ -94,12 +94,12 @@ export default function ({ getService }: FtrProviderContext) {
|
||||||
{
|
{
|
||||||
method: 'post',
|
method: 'post',
|
||||||
path: KILL_PROCESS_ROUTE,
|
path: KILL_PROCESS_ROUTE,
|
||||||
body: { endpoint_ids: ['one'], parameters: { entity_id: 1234 } },
|
body: { endpoint_ids: ['one'], parameters: { entity_id: 'abc123' } },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
method: 'post',
|
method: 'post',
|
||||||
path: SUSPEND_PROCESS_ROUTE,
|
path: SUSPEND_PROCESS_ROUTE,
|
||||||
body: { endpoint_ids: ['one'], parameters: { entity_id: 1234 } },
|
body: { endpoint_ids: ['one'], parameters: { entity_id: 'abc123' } },
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue