mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-29 01:11:46 -07:00
fix mysql_role, mysql_user integration tests
This commit is contained in:
parent
5df57fcec9
commit
70683314f1
2 changed files with 16 additions and 2 deletions
|
@ -139,10 +139,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 stayed the same
|
- name: Assert that the permissions stayed the same, with check_mode=='yes'
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- "'GRANT SELECT, INSERT ON `data1`.*' in result.stdout"
|
||||||
|
when: enable_check_mode == 'yes'
|
||||||
|
|
||||||
|
- name: Assert that the permissions stayed the same, with check_mode=='no'
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "'GRANT SELECT ON `data1`.*' in result.stdout"
|
- "'GRANT SELECT ON `data1`.*' in result.stdout"
|
||||||
|
when: enable_check_mode == 'no'
|
||||||
|
|
||||||
##########
|
##########
|
||||||
# Clean up
|
# Clean up
|
||||||
|
|
|
@ -144,10 +144,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 stayed the same
|
- name: Assert that the permissions stayed the same, with check_mode=='yes'
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- "'GRANT SELECT, INSERT ON `data1`.*' in result.stdout"
|
||||||
|
when: enable_check_mode == 'yes'
|
||||||
|
|
||||||
|
- name: Assert that the permissions stayed the same, with check_mode=='no'
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "'GRANT SELECT ON `data1`.*' in result.stdout"
|
- "'GRANT SELECT ON `data1`.*' in result.stdout"
|
||||||
|
when: enable_check_mode == 'no'
|
||||||
|
|
||||||
##########
|
##########
|
||||||
# Clean up
|
# Clean up
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue