Skip to content

Commit

Permalink
Fix FailedInstances automation to test SNOW CMDB with oauth enabled (d…
Browse files Browse the repository at this point in the history
…emisto#35694)

* Fix FailedInstances automation to test SNOW CMDB with oauth enabed

* try to enable tpb

* Revert "try to enable tpb"

This reverts commit 1b08776.
  • Loading branch information
yaakovpraisler authored Jul 31, 2024
1 parent bd37f9c commit bfbd4b0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions Packs/CommonScripts/ReleaseNotes/1_15_40.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Scripts

##### FailedInstances

- Fixed an issue where the script failed when a ServiceNow CMDB instance was configured with OAuth flow enabled.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Object.keys(all).forEach(function(m) {

var res = executeCommand(cmd, {});
var content = res[0].Contents
var result = content.includes("Test button cannot be used") && all[m].brand === "ServiceNow v2";
var result = content.includes("Test button cannot be used") && (all[m].brand === "ServiceNow v2" || all[m].brand === "ServiceNow CMDB");
if (result === true) {
cmd = 'servicenow-oauth-test'
cmd = all[m].brand === "ServiceNow v2" ? "servicenow-oauth-test" : "servicenow-cmdb-oauth-test"
res = executeCommand(cmd, {});
}
executeCommand("addEntries", {"entries": JSON.stringify([{
Expand Down
2 changes: 1 addition & 1 deletion Packs/CommonScripts/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Common Scripts",
"description": "Frequently used scripts pack.",
"support": "xsoar",
"currentVersion": "1.15.39",
"currentVersion": "1.15.40",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit bfbd4b0

Please sign in to comment.