mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-04 13:14:26 -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_query:
|
||||||
<<: *mysql_params
|
<<: *mysql_params
|
||||||
query: "SELECT 1 FROM mysql.user WHERE User = '{{ role0 }}' AND Host = '%'"
|
query: "SELECT 1 FROM mysql.user WHERE User = '{{ role0 }}' AND Host = '%'"
|
||||||
|
when: install_type == 'mysql'
|
||||||
|
|
||||||
- name: Check
|
- name: Check
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result.rowcount.0 == 1
|
- 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
|
- name: Check in DB, if not granted, the query will fail
|
||||||
<<: *task_params
|
<<: *task_params
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue