mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-01 19:54:26 -07:00
Add more tests
This commit is contained in:
parent
8e78265364
commit
a9b97b4681
1 changed files with 23 additions and 0 deletions
|
@ -581,6 +581,7 @@
|
|||
|
||||
- name: Plugin auth | Connect with user and password
|
||||
ansible.builtin.command: '{{ mysql_command }} -u {{ test_user_name }} -p{{ test_plugin_auth_string }} -e "SELECT 1"'
|
||||
changed_when: false
|
||||
|
||||
- name: Plugin auth | Change auth user plugin in check mode
|
||||
community.mysql.mysql_user:
|
||||
|
@ -636,3 +637,25 @@
|
|||
vars:
|
||||
user_name: "{{ test_user_name }}"
|
||||
plugin_type: caching_sha2_password
|
||||
|
||||
- name: Plugin auth | Change user password
|
||||
community.mysql.mysql_user:
|
||||
<<: *mysql_params
|
||||
name: "{{ test_user_name }}"
|
||||
host: '%'
|
||||
plugin: caching_sha2_password
|
||||
plugin_auth_string: newpass
|
||||
salt: "{{ test_salt }}"
|
||||
priv: "{{ test_default_priv }}"
|
||||
register: result
|
||||
failed_when: result is not changed
|
||||
|
||||
- name: Plugin auth | Connect with user and password
|
||||
ansible.builtin.command: '{{ mysql_command }} -u {{ test_user_name }} -pnewpass -e "SELECT 1"'
|
||||
changed_when: false
|
||||
|
||||
- name: Plugin auth | Check that the expected plugin type is set after change
|
||||
ansible.builtin.include_tasks: utils/assert_plugin.yml
|
||||
vars:
|
||||
user_name: "{{ test_user_name }}"
|
||||
plugin_type: caching_sha2_password
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue