mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-27 16:31:47 -07:00
Refactor tests to use "is" and "is not" changed
This commit is contained in:
parent
61586ae4cc
commit
e3a2b22fdd
18 changed files with 128 additions and 122 deletions
|
@ -51,7 +51,7 @@
|
|||
- name: assert output message for current privileges
|
||||
assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result is changed
|
||||
|
||||
- name: run command to show privileges for user (expect privileges in stdout)
|
||||
command: "{{ mysql_command }} -e \"SHOW GRANTS FOR '{{user_name_2}}'@'localhost'\""
|
||||
|
@ -101,7 +101,7 @@
|
|||
- name: Assert that priv changed
|
||||
assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result is changed
|
||||
|
||||
- name: Add privs to a specific table (expect ok)
|
||||
mysql_user:
|
||||
|
@ -115,7 +115,7 @@
|
|||
- name: Assert that priv did not change
|
||||
assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
- result is not changed
|
||||
|
||||
# ============================================================
|
||||
- name: update user with all privileges
|
||||
|
@ -162,7 +162,7 @@
|
|||
- name: Assert that priv changed
|
||||
assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- result is changed
|
||||
|
||||
- name: Test idempotency (expect ok)
|
||||
mysql_user:
|
||||
|
@ -177,7 +177,7 @@
|
|||
- name: Assert that priv did not change
|
||||
assert:
|
||||
that:
|
||||
- "result.changed == false"
|
||||
- result is not changed
|
||||
when: install_type == 'mysql' or (install_type == 'mariadb' and mariadb_version is version('10.2', '=='))
|
||||
|
||||
# ============================================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue