Skip tests that rely on sha256_password if pymysql < 0.9

This commit is contained in:
Steve Teahan 2020-12-30 00:46:00 -05:00
parent 38a7d416b9
commit 096f7dc592

View file

@ -310,8 +310,16 @@
- include: remove_user.yml user_name={{ test_user_name }} user_password={{ test_plugin_auth_string }}
# ============================================================
# Test plugin auth switching from one type of plugin to another.
# Test plugin auth switching from one type of plugin to another. The only other plugins that are loaded by default
# are sha2*, but these aren't compatible with pymysql < 0.9, so skip these tests for those versions.
#
- name: Get pymysql version
shell: pip show pymysql | awk '/Version/ {print $2}'
register: pymysql_version
- name: Test plugin auth switching which doesn't work on pymysql < 0.9
when: pymysql_version.stdout is version('0.9', '>=')
block:
- name: Create user with plugin auth (empty auth string)
mysql_user:
@ -321,6 +329,7 @@
priv: '{{ test_default_priv }}'
register: result
- name: Check that the module made a change
assert:
that: