Add more tests

This commit is contained in:
Fran Sanjuán 2024-08-28 17:50:53 +02:00
commit a9b97b4681

View file

@ -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