Refactor tests to use "is" and "is not" changed

This commit is contained in:
Laurent Indermuehle 2022-08-22 14:28:46 +02:00
commit e3a2b22fdd
No known key found for this signature in database
GPG key ID: 93FA944C9F34DD09
18 changed files with 128 additions and 122 deletions

View file

@ -45,7 +45,7 @@
- name: Assert that there wasn't a change in permissions
assert:
that:
- "result.changed == false"
- result is not changed
- name: Run command to show privileges for role (expect privileges in stdout)
command: "{{ mysql_command }} -e \"SHOW GRANTS FOR '{{ role2 }}'\""
@ -69,7 +69,7 @@
- name: Assert that there was a change because permissions were/would be revoked on data1.*
assert:
that:
- "result.changed == true"
- result is changed
- name: Run command to show privileges for role (expect privileges in stdout)
command: "{{ mysql_command }} -e \"SHOW GRANTS FOR '{{ role2 }}'\""
@ -100,7 +100,7 @@
- name: Assert that there was no change because invalid permissions are ignored
assert:
that:
- "result.changed == false"
- result is not changed
- name: Run command to show privileges for role (expect privileges in stdout)
command: "{{ mysql_command }} -e \"SHOW GRANTS FOR '{{ role2 }}'\""