Remove the condition to check the groups.
The code of the groups property in the Validation class changed. Before
the code didn't check if the key groups was there. You can see the
change[1] to have more information.
[1] eb62054a33
Closes-bug: #1917785
Co-authored-by: Owen McGonagle <omcgonag@redhat.com>
Change-Id: Ib11fd1b829bd56c19f82081d53440b4dd8237f3f
This commit is contained in:
parent
c54307403a
commit
28e069f170
|
@ -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")
|
||||
|
|
|
@ -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…
Reference in New Issue