mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-28 15:41:26 -07:00
* Add changes from stable-1 integrations tests (PR 418)
* Refactor to use connectors' info declared in setup_mysql
* Fix 2nd replication stop marked changed by mysqlclient
(cherry picked from commit 61586ae4cc
)
This commit is contained in:
parent
4cfdbe64a3
commit
108c4ae729
7 changed files with 18 additions and 16 deletions
|
@ -176,8 +176,8 @@
|
|||
shell: "echo \"INSERT INTO {{ test_table }} (id) VALUES (1), (2), (3); FLUSH LOGS;\" | {{ mysql_command }} -P{{ mysql_primary_port }} {{ test_db }}"
|
||||
|
||||
- name: Small pause to be sure the bin log, which was flushed previously, reached the replica
|
||||
pause:
|
||||
seconds: 2
|
||||
ansible.builtin.wait_for:
|
||||
timeout: 2
|
||||
|
||||
# Test master log pos has been changed:
|
||||
- name: Get replica status
|
||||
|
@ -207,13 +207,12 @@
|
|||
fail_on_error: true
|
||||
register: result
|
||||
|
||||
# Task is changed with mysqlclient 2.0.1 and pymysql 0.9.3
|
||||
# mysqlclient 2.0.1 always return "changed"
|
||||
- assert:
|
||||
that:
|
||||
- result is not changed
|
||||
when:
|
||||
- connector_name is search('pymysql')
|
||||
- connector_ver is version('0.9.3', '<=')
|
||||
- connector_name == 'pymysql'
|
||||
|
||||
# Test stopreplica mode:
|
||||
- name: Stop replica using deprecated stopslave choice
|
||||
|
@ -228,7 +227,12 @@
|
|||
- result is changed
|
||||
- result.queries == ["STOP SLAVE"] or result.queries == ["STOP REPLICA"]
|
||||
|
||||
- name: Pause for 2 seconds to let the replication stop
|
||||
ansible.builtin.wait_for:
|
||||
timeout: 2
|
||||
|
||||
# Test stopreplica mode:
|
||||
# mysqlclient 2.0.1 always return "changed"
|
||||
- name: Stop replica that is no longer running
|
||||
mysql_replication:
|
||||
<<: *mysql_params
|
||||
|
@ -237,10 +241,8 @@
|
|||
fail_on_error: true
|
||||
register: result
|
||||
|
||||
# Task is changed with mysqlclient 2.0.1 and pymysql 0.9.3
|
||||
- assert:
|
||||
that:
|
||||
- result is not changed
|
||||
when:
|
||||
- connector_name is search('pymysql')
|
||||
- connector_ver is version('0.9.3', '<=')
|
||||
- connector_name == 'pymysql'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue