-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding test playbook validation (#798)
* adding test playbook validation * fixing test script * fixing test script * Update demisto_sdk/commands/common/hook_validations/test_playbook.py Co-authored-by: Bar Katzir <37335599+bakatzir@users.noreply.github.com> * fixing test script * fixing test script Co-authored-by: Bar Katzir <37335599+bakatzir@users.noreply.github.com> Co-authored-by: sberman <sberman@paloaltonetworks.com>
- Loading branch information
1 parent
7993630
commit ce8a1a0
Showing
5 changed files
with
43 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
demisto_sdk/commands/common/hook_validations/test_playbook.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from demisto_sdk.commands.common.hook_validations.content_entity_validator import \ | ||
ContentEntityValidator | ||
|
||
|
||
class TestPlaybookValidator(ContentEntityValidator): | ||
"""TestPlaybookValidator is designed to validate the correctness of the file structure we enter to content repo for | ||
both test playbooks and scripts. | ||
""" | ||
|
||
def is_valid_file(self, validate_rn=True): | ||
"""Check whether the test playbook or script file is valid or not | ||
""" | ||
|
||
return all([ | ||
self.is_valid_fromversion(), | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters