mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-05 13:44:25 -07:00
tests: fix syntax
This commit is contained in:
parent
12a2bd358e
commit
8a0c09bb6b
3 changed files with 38 additions and 11 deletions
|
@ -12,5 +12,9 @@
|
||||||
|
|
||||||
# Test that subtract_privs will only revoke the grants given by priv
|
# Test that subtract_privs will only revoke the grants given by priv
|
||||||
# (https://github.com/ansible-collections/community.mysql/issues/331)
|
# (https://github.com/ansible-collections/community.mysql/issues/331)
|
||||||
- include_tasks: test_priv_subtract.yml enable_check_mode=no
|
- include_tasks: test_priv_subtract.yml
|
||||||
- include_tasks: test_priv_subtract.yml enable_check_mode=yes
|
vars:
|
||||||
|
enable_check_mode: no
|
||||||
|
- include_tasks: test_priv_subtract.yml
|
||||||
|
vars:
|
||||||
|
enable_check_mode: yes
|
||||||
|
|
|
@ -213,35 +213,55 @@
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# Assert create user with SELECT privileges, attempt to create database and update privileges to create database
|
# Assert create user with SELECT privileges, attempt to create database and update privileges to create database
|
||||||
#
|
#
|
||||||
- include_tasks: test_privs.yml current_privilege=SELECT current_append_privs=no
|
- include_tasks: test_privs.yml
|
||||||
|
vars:
|
||||||
|
current_privilege: SELECT
|
||||||
|
current_append_privs: no
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# Assert creating user with SELECT privileges, attempt to create database and append privileges to create database
|
# Assert creating user with SELECT privileges, attempt to create database and append privileges to create database
|
||||||
#
|
#
|
||||||
- include_tasks: test_privs.yml current_privilege=DROP current_append_privs=yes
|
- include_tasks: test_privs.yml
|
||||||
|
vars:
|
||||||
|
current_privilege: DROP
|
||||||
|
current_append_privs: yes
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# Assert create user with SELECT privileges, attempt to create database and update privileges to create database
|
# Assert create user with SELECT privileges, attempt to create database and update privileges to create database
|
||||||
#
|
#
|
||||||
- include_tasks: test_privs.yml current_privilege='UPDATE,ALTER' current_append_privs=no
|
- include_tasks: test_privs.yml
|
||||||
|
vars:
|
||||||
|
current_privilege: 'UPDATE,ALTER'
|
||||||
|
current_append_privs: no
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# Assert creating user with SELECT privileges, attempt to create database and append privileges to create database
|
# Assert creating user with SELECT privileges, attempt to create database and append privileges to create database
|
||||||
#
|
#
|
||||||
- include_tasks: test_privs.yml current_privilege='INSERT,DELETE' current_append_privs=yes
|
- include_tasks: test_privs.yml
|
||||||
|
vars:
|
||||||
|
current_privilege: 'INSERT,DELETE'
|
||||||
|
current_append_privs: yes
|
||||||
|
|
||||||
# Tests for the priv parameter with dict value (https://github.com/ansible/ansible/issues/57533)
|
# Tests for the priv parameter with dict value (https://github.com/ansible/ansible/issues/57533)
|
||||||
- include_tasks: test_priv_dict.yml
|
- include_tasks: test_priv_dict.yml
|
||||||
|
|
||||||
# Test that append_privs will not attempt to make a change where current privileges are a superset of new privileges
|
# Test that append_privs will not attempt to make a change where current privileges are a superset of new privileges
|
||||||
# (https://github.com/ansible-collections/community.mysql/issues/69)
|
# (https://github.com/ansible-collections/community.mysql/issues/69)
|
||||||
- include_tasks: test_priv_append.yml enable_check_mode=no
|
- include_tasks: test_priv_append.yml
|
||||||
- include_tasks: test_priv_append.yml enable_check_mode=yes
|
vars:
|
||||||
|
enable_check_mode: no
|
||||||
|
- include_tasks: test_priv_append.yml
|
||||||
|
vars:
|
||||||
|
enable_check_mode: yes
|
||||||
|
|
||||||
# Test that subtract_privs will only revoke the grants given by priv
|
# Test that subtract_privs will only revoke the grants given by priv
|
||||||
# (https://github.com/ansible-collections/community.mysql/issues/331)
|
# (https://github.com/ansible-collections/community.mysql/issues/331)
|
||||||
- include_tasks: test_priv_subtract.yml enable_check_mode=no
|
- include_tasks: test_priv_subtract.yml
|
||||||
- include_tasks: test_priv_subtract.yml enable_check_mode=yes
|
vars:
|
||||||
|
enable_check_mode: no
|
||||||
|
- include_tasks: test_priv_subtract.yml
|
||||||
|
vars:
|
||||||
|
enable_check_mode: yes
|
||||||
|
|
||||||
- import_tasks: test_privs_issue_465.yml
|
- import_tasks: test_privs_issue_465.yml
|
||||||
tags:
|
tags:
|
||||||
|
|
|
@ -58,7 +58,10 @@
|
||||||
# ========================================================================
|
# ========================================================================
|
||||||
|
|
||||||
# Create blank user to be removed later
|
# Create blank user to be removed later
|
||||||
- include_tasks: utils/create_user.yml user_name="" user_password='KJFDY&D*Sfuysf'
|
- include_tasks: utils/create_user.yml
|
||||||
|
vars:
|
||||||
|
user_name: ""
|
||||||
|
user_password: 'KJFDY&D*Sfuysf'
|
||||||
|
|
||||||
- name: Idempotency | Remove blank user with hosts=all (expect changed)
|
- name: Idempotency | Remove blank user with hosts=all (expect changed)
|
||||||
mysql_user:
|
mysql_user:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue