update role to provide better error messages (#12599)

This commit is contained in:
Sean Sullivan
2022-08-11 07:09:11 -04:00
committed by GitHub
parent 8cf75fce8c
commit 3712af4df8
2 changed files with 34 additions and 6 deletions

View File

@@ -121,6 +121,22 @@
that:
- "result is changed"
- name: Add Joe to nonexistant job template execute role
role:
user: "{{ username }}"
role: execute
workflow: test-role-workflow
job_templates:
- non existant temp
state: present
register: result
ignore_errors: true
- assert:
that:
- "'There were 1 missing items, missing items' in result.msg"
- "'non existant temp' in result.msg"
- name: Add Joe to workflow execute role, no-op
role:
user: "{{ username }}"