New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Actions][ServiceNow] Allow to close serviceNow incident when alert resolves #171760
Changes from 8 commits
b9575ad
66e64a4
e03299f
ae5c27c
b56614c
c61847c
ca1edd7
bfea86f
9dea10e
64630fb
a46435b
d627b86
ce990a0
48cc417
761e4c2
b7b7585
6cdc701
e890e55
2cdac29
c8ff4fe
d163bc1
c6b81fa
7088a16
7fc2b4e
e3b43c7
6c2d3da
c500f7f
c2ce8fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,18 @@ describe('servicenow action params validation', () => { | |
}); | ||
}); | ||
|
||
test(`${SERVICENOW_ITSM_CONNECTOR_TYPE_ID}: action params validation succeeds when no short_description provided and subAction is closeIncident`, async () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think about testing that there are no errors at all? This will make the test fail if someone adds a new required field and forgets the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added test in d627b86, is this what you meant? |
||
const connectorTypeModel = connectorTypeRegistry.get(SERVICENOW_ITSM_CONNECTOR_TYPE_ID); | ||
const actionParams = { | ||
subAction: 'closeIncident', | ||
subActionParams: { incident: { correlation_id: 'test' } }, | ||
}; | ||
|
||
expect(await connectorTypeModel.validateParams(actionParams)).toEqual({ | ||
errors: { ['subActionParams.incident.short_description']: [] }, | ||
}); | ||
}); | ||
|
||
test(`${SERVICENOW_ITSM_CONNECTOR_TYPE_ID}: params validation fails when short_description is not valid`, async () => { | ||
const connectorTypeModel = connectorTypeRegistry.get(SERVICENOW_ITSM_CONNECTOR_TYPE_ID); | ||
const actionParams = { | ||
|
js-jankisalvi marked this conversation as resolved.
Show resolved
Hide resolved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To allow
Recovered
option inRun when
dropdownThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elastic/response-ops-execution FYI, it seems that some connectors are missing from this list like the
.servicenow-secops
connector.