Simplify connector_name variables

This commit is contained in:
Laurent Indermuehle 2023-01-13 16:22:35 +01:00
parent 70e23b25da
commit 199b7a5b64
No known key found for this signature in database
GPG key ID: 93FA944C9F34DD09
11 changed files with 44 additions and 26 deletions

View file

@ -53,12 +53,14 @@
- assert:
that:
- result is failed
when: connector_name is search('pymysql')
when:
- connector_name == 'pymysql'
- assert:
that:
- result is succeeded
when: connector_name is not search('pymysql')
when:
- connector_name != 'pymysql'
- name: attempt connection with newly created user ignoring hostname
mysql_query:

View file

@ -343,7 +343,8 @@
that:
# PyMySQL driver throws a warning, so the following is correct
- result is not changed
when: connector_name is search('pymysql')
when:
- connector_name == 'pymysql'
# Issue https://github.com/ansible-collections/community.mysql/issues/268
- assert:
@ -352,7 +353,8 @@
# if the state was changed or not.
# We assume that it was for DDL queryes by default in the code
- result is changed
when: connector_name is search('mysqlclient')
when:
- connector_name == 'mysqlclient'
- name: Drop db {{ test_db }}
mysql_query: