mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-03 12:44:25 -07:00
Fix: test_mysql_role : Check in DB assertion
This commit is contained in:
parent
4a5333262e
commit
5e4f3653ed
1 changed files with 15 additions and 0 deletions
|
@ -147,11 +147,26 @@
|
|||
mysql_query:
|
||||
<<: *mysql_params
|
||||
query: "SELECT 1 FROM mysql.user WHERE User = '{{ role0 }}' AND Host = '%'"
|
||||
when: install_type == 'mysql'
|
||||
|
||||
- name: Check
|
||||
assert:
|
||||
that:
|
||||
- result.rowcount.0 == 1
|
||||
when: install_type == 'mysql'
|
||||
|
||||
- name: Check in DB (mariadb)
|
||||
<<: *task_params
|
||||
mysql_query:
|
||||
<<: *mysql_params
|
||||
query: "SELECT 1 FROM mysql.user WHERE User = '{{ role0 }}' AND Host = ''"
|
||||
when: install_type == 'mariadb'
|
||||
|
||||
- name: Check (mariadb)
|
||||
assert:
|
||||
that:
|
||||
- result.rowcount.0 == 1
|
||||
when: install_type == 'mariadb'
|
||||
|
||||
- name: Check in DB, if not granted, the query will fail
|
||||
<<: *task_params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue