mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-02 04:04: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
|
- 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"'
|
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
|
- name: Plugin auth | Change auth user plugin in check mode
|
||||||
community.mysql.mysql_user:
|
community.mysql.mysql_user:
|
||||||
|
@ -636,3 +637,25 @@
|
||||||
vars:
|
vars:
|
||||||
user_name: "{{ test_user_name }}"
|
user_name: "{{ test_user_name }}"
|
||||||
plugin_type: caching_sha2_password
|
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