mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-07-19 15:04:23 +02:00
Optimized for github workflow
This commit is contained in:
parent
8113e412dd
commit
e4ce3848fc
@ -5,4 +5,5 @@ venv
|
|||||||
*.bak
|
*.bak
|
||||||
*tree.json
|
*tree.json
|
||||||
roles/list.json
|
roles/list.json
|
||||||
|
*.pyc
|
||||||
.git
|
.git
|
||||||
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,7 @@
|
|||||||
|
# The .gitignore is the single point of truth for files which should be ignored.
|
||||||
|
# Add patterns, files and folders to the .gitignore and execute 'make build'
|
||||||
|
# NEVER TOUCH THE .dockerignore, BECAUSE IT ANYHOW WILL BE OVERWRITTEN
|
||||||
|
|
||||||
site.retry
|
site.retry
|
||||||
*__pycache__
|
*__pycache__
|
||||||
venv
|
venv
|
||||||
@ -5,3 +9,4 @@ venv
|
|||||||
*.bak
|
*.bak
|
||||||
*tree.json
|
*tree.json
|
||||||
roles/list.json
|
roles/list.json
|
||||||
|
*.pyc
|
||||||
|
@ -60,6 +60,7 @@ RUN CMAIS_PATH=$(pkgmgr path cymais) && \
|
|||||||
chmod +x /usr/local/bin/cymais
|
chmod +x /usr/local/bin/cymais
|
||||||
|
|
||||||
# 10) Run integration tests
|
# 10) Run integration tests
|
||||||
|
# This needed to be deactivated becaus it doesn't work with gitthub workflow
|
||||||
#RUN CMAIS_PATH=$(pkgmgr path cymais) && \
|
#RUN CMAIS_PATH=$(pkgmgr path cymais) && \
|
||||||
# cd "$CMAIS_PATH" && \
|
# cd "$CMAIS_PATH" && \
|
||||||
# make test
|
# make test
|
||||||
|
@ -52,11 +52,10 @@ class TestGetRoleFolder(unittest.TestCase):
|
|||||||
self.assertIn(f"Roles path not found: {invalid_path}", str(cm.exception))
|
self.assertIn(f"Roles path not found: {invalid_path}", str(cm.exception))
|
||||||
|
|
||||||
def test_invalid_yaml_raises(self):
|
def test_invalid_yaml_raises(self):
|
||||||
# Create a role with invalid YAML
|
# Create a role with invalid YAML that matches the target application_id
|
||||||
bad_role_path = os.path.join(self.roles_dir, 'badrole', 'vars')
|
bad_role_path = os.path.join(self.roles_dir, 'role1', 'vars')
|
||||||
os.makedirs(bad_role_path)
|
|
||||||
with open(os.path.join(bad_role_path, 'main.yml'), 'w') as f:
|
with open(os.path.join(bad_role_path, 'main.yml'), 'w') as f:
|
||||||
f.write("::: invalid yaml :::")
|
f.write("::: invalid yaml :::") # corrupt existing main.yml
|
||||||
|
|
||||||
with self.assertRaises(AnsibleFilterError) as cm:
|
with self.assertRaises(AnsibleFilterError) as cm:
|
||||||
get_role('app-123', roles_path=self.roles_dir)
|
get_role('app-123', roles_path=self.roles_dir)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user