mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-27 15:11:28 -07:00
Add filter for issues resolved in newer version of mysqlclient
This commit is contained in:
parent
06ed7374d7
commit
73ee8f07c9
1 changed files with 10 additions and 5 deletions
|
@ -339,22 +339,27 @@
|
|||
register: result
|
||||
|
||||
# Issue https://github.com/ansible-collections/community.mysql/issues/268
|
||||
- assert:
|
||||
- name: "Assert that create table IF NOT EXISTS is not changed with pymysql \
|
||||
and mysqlclient > 2.0.1"
|
||||
assert:
|
||||
that:
|
||||
# PyMySQL driver throws a warning, so the following is correct
|
||||
- result is not changed
|
||||
when:
|
||||
- connector_name == 'pymysql'
|
||||
or (connector_name == 'mysqlclient' and connector_ver is version('2.0.1', '>'))
|
||||
|
||||
# Issue https://github.com/ansible-collections/community.mysql/issues/268
|
||||
- assert:
|
||||
- name: Assert that create table IF NOT EXISTS is changed with mysqlclient <=2.0.1
|
||||
assert:
|
||||
that:
|
||||
# mysqlclient driver throws nothing, so it's impossible to figure out
|
||||
# if the state was changed or not.
|
||||
# We assume that it was for DDL queryes by default in the code
|
||||
# Before mysqlclient 2.0.3, driver throws nothing, so it's impossible to
|
||||
# figure out if the state was changed or not.
|
||||
# We assume that it was for DDL queries by default in the code
|
||||
- result is changed
|
||||
when:
|
||||
- connector_name == 'mysqlclient'
|
||||
- connector_ver is version('2.0.1', '<=')
|
||||
|
||||
- name: Drop db {{ test_db }}
|
||||
mysql_query:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue