fix integration tests

This commit is contained in:
Felix Hamme 2022-04-14 14:59:41 +02:00
commit 501dd7d0ab
2 changed files with 8 additions and 8 deletions

View file

@ -75,17 +75,17 @@
command: "{{ mysql_command }} -e \"SHOW GRANTS FOR '{{ role2 }}'\"" command: "{{ mysql_command }} -e \"SHOW GRANTS FOR '{{ role2 }}'\""
register: result register: result
- name: Assert that the permissions were not changed if check_mode is set to 'no' - name: Assert that the permissions were not changed if check_mode is set to 'yes'
assert: assert:
that: that:
- "'GRANT SELECT, INSERT ON `data1`.*' in result.stdout" - "'GRANT SELECT, INSERT ON `data1`.*' in result.stdout"
when: enable_check_mode == 'no' when: enable_check_mode == 'yes'
- name: Assert that only DELETE was revoked if check_mode is set to 'yes' - name: Assert that only DELETE was revoked if check_mode is set to 'no'
assert: assert:
that: that:
- "'GRANT SELECT ON `data1`.*' in result.stdout" - "'GRANT SELECT ON `data1`.*' in result.stdout"
when: enable_check_mode == 'yes' when: enable_check_mode == 'no'
- name: Try to subtract invalid privileges - name: Try to subtract invalid privileges
mysql_role: mysql_role:

View file

@ -78,17 +78,17 @@
command: "{{ mysql_command }} -e \"SHOW GRANTS FOR '{{ user_name_4 }}'@'localhost'\"" command: "{{ mysql_command }} -e \"SHOW GRANTS FOR '{{ user_name_4 }}'@'localhost'\""
register: result register: result
- name: Assert that the permissions were not changed if check_mode is set to 'no' - name: Assert that the permissions were not changed if check_mode is set to 'yes'
assert: assert:
that: that:
- "'GRANT SELECT, INSERT ON `data1`.*' in result.stdout" - "'GRANT SELECT, INSERT ON `data1`.*' in result.stdout"
when: enable_check_mode == 'no' when: enable_check_mode == 'yes'
- name: Assert that only DELETE was revoked if check_mode is set to 'yes' - name: Assert that only DELETE was revoked if check_mode is set to 'no'
assert: assert:
that: that:
- "'GRANT SELECT ON `data1`.*' in result.stdout" - "'GRANT SELECT ON `data1`.*' in result.stdout"
when: enable_check_mode == 'yes' when: enable_check_mode == 'no'
- name: Try to subtract invalid privileges - name: Try to subtract invalid privileges
mysql_user: mysql_user: