mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2026-02-04 07:11:49 +00:00
Remove testing against mysqlclient
This commit is contained in:
parent
08257cd4d4
commit
46a89c748f
7 changed files with 7 additions and 48 deletions
13
.github/workflows/ansible-test-plugins.yml
vendored
13
.github/workflows/ansible-test-plugins.yml
vendored
|
|
@ -58,11 +58,7 @@ jobs:
|
|||
- '11.4.5'
|
||||
connector_name:
|
||||
- pymysql
|
||||
- mysqlclient
|
||||
connector_version:
|
||||
- '0.9.3'
|
||||
- '1.0.2'
|
||||
- '1.1.1'
|
||||
- '2.0.1'
|
||||
- '2.0.3'
|
||||
- '2.1.1'
|
||||
|
|
@ -107,15 +103,6 @@ jobs:
|
|||
- connector_name: pymysql
|
||||
connector_version: '2.1.1'
|
||||
|
||||
- connector_name: mysqlclient
|
||||
connector_version: '0.9.3'
|
||||
|
||||
- connector_name: mysqlclient
|
||||
connector_version: '1.0.2'
|
||||
|
||||
- connector_name: mysqlclient
|
||||
connector_version: '1.1.1'
|
||||
|
||||
- db_engine_version: '8.0.38'
|
||||
ansible: stable-2.17
|
||||
|
||||
|
|
|
|||
2
changelogs/fragments/2-drop_mysql_client.yml
Normal file
2
changelogs/fragments/2-drop_mysql_client.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
breaking_changes:
|
||||
- collection - stop testing against mysqlclient connector as its support was deprecated in this collection - use PyMySQL connector instead! It'll stop working in 5.0.0 when we remove all related code (https://github.com/ansible-collections/community.mysql/issues/654).
|
||||
|
|
@ -33,14 +33,6 @@
|
|||
when:
|
||||
- connector_name == 'pymysql'
|
||||
|
||||
- name: Assert that mysql_info module used the expected version of mysqlclient
|
||||
assert:
|
||||
that:
|
||||
- primary_info.connector_name == 'MySQLdb'
|
||||
- primary_info.connector_version == connector_version
|
||||
when:
|
||||
- connector_name == 'mysqlclient'
|
||||
|
||||
- name: Get the python version in use
|
||||
ansible.builtin.shell:
|
||||
cmd: echo $( $(command -v python || command -v python3) -V )
|
||||
|
|
|
|||
|
|
@ -404,20 +404,15 @@
|
|||
- connector_version is version('0.10.0', '<')
|
||||
|
||||
# Issue https://github.com/ansible-collections/community.mysql/issues/268
|
||||
- name: Assert that create table IF NOT EXISTS is changed with mysqlclient
|
||||
- name: Assert that create table IF NOT EXISTS is changed
|
||||
assert:
|
||||
that:
|
||||
# Mysqlclient 2.0.1 and pymysql 0.10.0+ drivers throws no warning,
|
||||
# pymysql 0.10.0+ drivers throw no warning,
|
||||
# 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'
|
||||
or (
|
||||
connector_name == 'pymysql'
|
||||
and connector_version is version('0.10.0', '>')
|
||||
)
|
||||
- connector_name == 'pymysql' and connector_version is version('0.10.0', '>')
|
||||
|
||||
- name: Drop db {{ test_db }}
|
||||
mysql_query:
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@
|
|||
fail_on_error: true
|
||||
register: result
|
||||
|
||||
# mysqlclient 2.0.1 and pymysql 0.10.0+ always return "changed"
|
||||
# pymysql 0.10.0+ always returns "changed"
|
||||
- name: Assert that startreplica is not changed
|
||||
assert:
|
||||
that:
|
||||
|
|
@ -306,7 +306,7 @@
|
|||
timeout: 2
|
||||
|
||||
# Test stopreplica mode:
|
||||
# mysqlclient 2.0.1 and pymysql 0.10.0+ always return "changed"
|
||||
# pymysql 0.10.0+ always returns "changed"
|
||||
- name: Stop replica that is no longer running
|
||||
mysql_replication:
|
||||
<<: *mysql_params
|
||||
|
|
|
|||
|
|
@ -60,13 +60,6 @@
|
|||
when:
|
||||
- connector_name == 'pymysql'
|
||||
|
||||
- name: Assert that result is success for mysqlclient
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result is succeeded
|
||||
when:
|
||||
- connector_name != 'pymysql'
|
||||
|
||||
- name: attempt connection with newly created user ignoring hostname
|
||||
community.mysql.mysql_variables:
|
||||
variable: '{{ set_name }}'
|
||||
|
|
|
|||
|
|
@ -184,16 +184,6 @@
|
|||
register: oor_result
|
||||
ignore_errors: true
|
||||
|
||||
- include_tasks: assert_var.yml
|
||||
vars:
|
||||
changed: true
|
||||
output: "{{ oor_result }}"
|
||||
var_name: max_connect_errors
|
||||
var_value: 1
|
||||
when:
|
||||
- connector_name == 'mysqlclient'
|
||||
- db_engine == 'mysql' # mysqlclient returns "changed" with MariaDB
|
||||
|
||||
- include_tasks: assert_fail_msg.yml
|
||||
vars:
|
||||
output: "{{ oor_result }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue