Skip to content

Commit 6f817b0

Browse files
committed
Add test to endpoint action client to validate cancel force option is sent to endpoint
1 parent e001da8 commit 6f817b0

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/endpoint/endpoint_actions_client.test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,10 @@ describe('EndpointActionsClient', () => {
450450

451451
runscript: endpointActionClientMock.createRunScriptOptions(getCommonResponseActionOptions()),
452452

453-
cancel: responseActionsClientMock.createCancelActionOptions(getCommonResponseActionOptions()),
453+
cancel: responseActionsClientMock.createCancelActionOptions({
454+
...getCommonResponseActionOptions(),
455+
parameters: { id: 'test-action-id-123', force: true },
456+
}),
454457
};
455458

456459
it.each(Object.keys(responseActionMethods) as ResponseActionsMethodsOnly[])(
@@ -502,6 +505,13 @@ describe('EndpointActionsClient', () => {
502505
};
503506
expectedComment = `(Script name: script one / File name: my_script.sh) ${expectedComment}`;
504507
break;
508+
509+
case 'cancel':
510+
expectedParams = {
511+
id: 'test-action-id-123',
512+
force: true,
513+
};
514+
break;
505515
}
506516

507517
expect(

0 commit comments

Comments
 (0)