Browse Source

Merge "Remove the condition to check the groups."

changes/09/779509/1
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
861232b6ec
2 changed files with 0 additions and 13 deletions
  1. +0
    -10
      validations_libs/tests/test_utils.py
  2. +0
    -3
      validations_libs/utils.py

+ 0
- 10
validations_libs/tests/test_utils.py View File

@ -223,13 +223,3 @@ class TestUtils(TestCase):
self.assertRaises(TypeError,
utils.convert_data,
data=data_dict)
@mock.patch('yaml.safe_load', return_value=fakes.FAKE_PLAYBOOK3)
@mock.patch('six.moves.builtins.open')
@mock.patch('glob.glob')
def test_playbook_without_groups(self, mock_glob, mock_open, mock_load):
mock_glob.return_value = \
['/foo/playbook/foo.yaml']
self.assertRaises(RuntimeError,
utils.parse_all_validations_on_disk,
"/foo/playbook")

+ 0
- 3
validations_libs/utils.py View File

@ -88,9 +88,6 @@ def parse_all_validations_on_disk(path, groups=None):
for pl in validations_abspath:
val = Validation(pl)
if not val.groups:
msg = 'Group not found in playbook - please add appropriate group'
raise RuntimeError(msg)
if not groups or set(groups).intersection(val.groups):
results.append(val.get_metadata)


Loading…
Cancel
Save