mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Different optimations and mig integration. test will fail due to strickter validation checks. need to be cleaned up tomorrow
This commit is contained in:
22
tests/integration/test_roles_have_meta_main.py
Normal file
22
tests/integration/test_roles_have_meta_main.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import os
|
||||
import unittest
|
||||
|
||||
ROLES_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../roles'))
|
||||
|
||||
class TestRolesHaveMetaMain(unittest.TestCase):
|
||||
def test_each_role_has_meta_main(self):
|
||||
missing_meta = []
|
||||
for role in os.listdir(ROLES_DIR):
|
||||
role_path = os.path.join(ROLES_DIR, role)
|
||||
if os.path.isdir(role_path):
|
||||
meta_main = os.path.join(role_path, 'meta', 'main.yml')
|
||||
if not os.path.isfile(meta_main):
|
||||
missing_meta.append(role)
|
||||
if missing_meta:
|
||||
self.fail(
|
||||
"The following roles are missing meta/main.yml:\n" +
|
||||
"\n".join(missing_meta)
|
||||
)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Reference in New Issue
Block a user