Skip to content

Commit

Permalink
[CommonScripts] Fix comparison key in ProvidesCommand script (#32552) (
Browse files Browse the repository at this point in the history
…#32676)

* fix(ProvidesCommand): Fix dict key when comparing command with enabled instances

* fix(ProvidesCommand): modify release note to pass pipeline

* fix(ProvidesCommand): add release note version

* add name in the list

* fix after review

---------

Co-authored-by: pl-brault <143391737+pl-brault@users.noreply.github.com>
Co-authored-by: Yuval Hayun <70104171+YuvHayun@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 2, 2024
1 parent 85ea63c commit 2e0a6a9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions Packs/CommonScripts/ReleaseNotes/1_13_32.md
@@ -0,0 +1,7 @@

#### Scripts

##### ProvidesCommand

- Fixed an issue where the script would miss enabled commands due to a mismatch between comparison key when checking that a command is part of enabled instances.
- Updated the Docker image to: *demisto/python3:3.10.13.86272*.
Expand Up @@ -50,7 +50,7 @@ def main():

for integration in integration_commands:

integration_name = integration['display']
integration_name = integration['name']

if 'commands' in integration:
for command in integration['commands']:
Expand Down
Expand Up @@ -25,7 +25,7 @@ dependson:
must:
- core-api-post
- core-api-get
dockerimage: demisto/python3:3.10.13.83255
dockerimage: demisto/python3:3.10.13.86272
runas: DBotWeakRole
tests:
- No test - unit test
Expand Down
Expand Up @@ -28,7 +28,7 @@ def test_main(mocker):
main()
assert demisto.results.call_count == 1
results = demisto.results.call_args
assert results[0][0] == 'EWS Mail Sender,Gmail,Mail Sender (Deprecated),Mail Sender (New)'
assert results[0][0] == 'EWS Mail Sender,Gmail,mail-sender,Mail Sender (New)'

mocker.patch.object(demisto, 'args', return_value={
'command': 'send-mail',
Expand All @@ -48,4 +48,4 @@ def test_main(mocker):
main()
assert demisto.results.call_count == 1
results = demisto.results.call_args
assert results[0][0] == 'EWS Mail Sender,Gmail,Mail Sender (Deprecated)'
assert results[0][0] == 'EWS Mail Sender,Gmail,mail-sender'
4 changes: 2 additions & 2 deletions Packs/CommonScripts/pack_metadata.json
Expand Up @@ -2,7 +2,7 @@
"name": "Common Scripts",
"description": "Frequently used scripts pack.",
"support": "xsoar",
"currentVersion": "1.13.31",
"currentVersion": "1.13.32",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down Expand Up @@ -58,4 +58,4 @@
"marketplacev2",
"xpanse"
]
}
}

0 comments on commit 2e0a6a9

Please sign in to comment.