mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-28 05:11:26 -07:00
Add unique test names
This commit is contained in:
parent
05a6589fc5
commit
ae41a50626
1 changed files with 13 additions and 13 deletions
|
@ -383,7 +383,7 @@
|
||||||
- name: Check
|
- name: Check
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result.rowcount.0 == 0
|
- result.rowcount.0 == 0
|
||||||
|
|
||||||
- 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
|
||||||
|
@ -396,7 +396,7 @@
|
||||||
- name: Check
|
- name: Check
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is failed
|
- result is failed
|
||||||
when: db_engine == 'mysql'
|
when: db_engine == 'mysql'
|
||||||
|
|
||||||
- name: Check in DB (mariadb)
|
- name: Check in DB (mariadb)
|
||||||
|
@ -410,10 +410,10 @@
|
||||||
- name: Check (mariadb)
|
- name: Check (mariadb)
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result.query_result.0.0['user_roles'] == 0
|
- result.query_result.0.0['user_roles'] == 0
|
||||||
when: db_engine == 'mariadb'
|
when: db_engine == 'mariadb'
|
||||||
|
|
||||||
#========================
|
# ========================
|
||||||
|
|
||||||
- name: Drop role {{ role0 }} again in check_mode
|
- name: Drop role {{ role0 }} again in check_mode
|
||||||
<<: *task_params
|
<<: *task_params
|
||||||
|
@ -426,7 +426,7 @@
|
||||||
- name: Check
|
- name: Check
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is not changed
|
- result is not changed
|
||||||
|
|
||||||
- name: Drop role {{ role0 }} again
|
- name: Drop role {{ role0 }} again
|
||||||
<<: *task_params
|
<<: *task_params
|
||||||
|
@ -435,10 +435,10 @@
|
||||||
name: '{{ role0 }}'
|
name: '{{ role0 }}'
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Check
|
- name: Assert that droping the role again is not changed
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is not changed
|
- result is not changed
|
||||||
|
|
||||||
# ==================
|
# ==================
|
||||||
|
|
||||||
|
@ -449,16 +449,16 @@
|
||||||
name: '{{ role0 }}'
|
name: '{{ role0 }}'
|
||||||
state: present
|
state: present
|
||||||
members:
|
members:
|
||||||
- '{{ user0 }}@{{ gateway_addr }}'
|
- '{{ user0 }}@{{ gateway_addr }}'
|
||||||
priv:
|
priv:
|
||||||
'*.*': 'SELECT,INSERT'
|
'*.*': 'SELECT,INSERT'
|
||||||
'mysql.*': 'UPDATE'
|
'mysql.*': 'UPDATE'
|
||||||
check_mode: yes
|
check_mode: yes
|
||||||
|
|
||||||
- name: Check
|
- name: Assert that create role in check_mode is changed
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: Check in DB
|
- name: Check in DB
|
||||||
<<: *task_params
|
<<: *task_params
|
||||||
|
@ -466,12 +466,12 @@
|
||||||
<<: *mysql_params
|
<<: *mysql_params
|
||||||
query: "SELECT 1 FROM mysql.user WHERE User = '{{ role0 }}'"
|
query: "SELECT 1 FROM mysql.user WHERE User = '{{ role0 }}'"
|
||||||
|
|
||||||
- name: Check
|
- name: Assert that create role in check_mode is not in the database
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result.rowcount.0 == 0
|
- result.rowcount.0 == 0
|
||||||
|
|
||||||
#========================
|
# ========================
|
||||||
|
|
||||||
- name: Create role {{ role0 }}
|
- name: Create role {{ role0 }}
|
||||||
<<: *task_params
|
<<: *task_params
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue