From 3325643438535099bc7455ab1be1f41fdfff3c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=20Sanju=C3=A1n?= Date: Fri, 23 Aug 2024 16:58:06 +0200 Subject: [PATCH] Add one more check --- .../tasks/test_user_plugin_auth.yml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/integration/targets/test_mysql_user/tasks/test_user_plugin_auth.yml b/tests/integration/targets/test_mysql_user/tasks/test_user_plugin_auth.yml index 09708e8..968345b 100644 --- a/tests/integration/targets/test_mysql_user/tasks/test_user_plugin_auth.yml +++ b/tests/integration/targets/test_mysql_user/tasks/test_user_plugin_auth.yml @@ -579,6 +579,7 @@ host: '%' plugin: caching_sha2_password plugin_hash_string: '{{ test_plugin_hash }}' + salt: '{{ test_salt }}' priv: '{{ test_default_priv }}' check_mode: true register: result @@ -597,6 +598,7 @@ host: '%' plugin: caching_sha2_password plugin_hash_string: '{{ test_plugin_hash }}' + salt: '{{ test_salt }}' priv: '{{ test_default_priv }}' register: result failed_when: result is not changed @@ -606,3 +608,21 @@ vars: user_name: "{{ test_user_name }}" plugin_type: caching_sha2_password + + - name: Plugin auth | Change user plugin again (should not change) + community.mysql.mysql_user: + <<: *mysql_params + name: '{{ test_user_name }}' + host: '%' + plugin: caching_sha2_password + plugin_hash_string: '{{ test_plugin_hash }}' + salt: '{{ test_salt }}' + priv: '{{ test_default_priv }}' + register: result + failed_when: result is changed + + - name: Plugin auth | Check that the expected (not changed) plugin type is set + ansible.builtin.include_tasks: utils/assert_plugin.yml + vars: + user_name: "{{ test_user_name }}" + plugin_type: caching_sha2_password