mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-05-20 07:59:11 -07:00
test: add check for changereplication
This commit is contained in:
parent
5da42f8095
commit
3e03423e40
1 changed files with 22 additions and 0 deletions
|
@ -38,3 +38,25 @@
|
||||||
- db_version is version('8.0.23', '>=')
|
- db_version is version('8.0.23', '>=')
|
||||||
vars:
|
vars:
|
||||||
expected_queries: ["CHANGE REPLICATION SOURCE TO SOURCE_SSL_VERIFY_SERVER_CERT=0"]
|
expected_queries: ["CHANGE REPLICATION SOURCE TO SOURCE_SSL_VERIFY_SERVER_CERT=0"]
|
||||||
|
|
||||||
|
- name: Disable ssl verification for MySQL 8.0.23+
|
||||||
|
community.mysql.mysql_replication:
|
||||||
|
<<: *mysql_params
|
||||||
|
login_port: '{{ mysql_replica1_port }}'
|
||||||
|
mode: changereplication
|
||||||
|
primary_ssl_verify_server_cert: false
|
||||||
|
register: result
|
||||||
|
when:
|
||||||
|
- db_engine == 'mysql'
|
||||||
|
- db_version is version('8.0.23', '>=')
|
||||||
|
|
||||||
|
- name: Assert that changereplication is changed and return expected query for MySQL > 8.0.23
|
||||||
|
ansible.builtin.assert:
|
||||||
|
that:
|
||||||
|
- result is changed
|
||||||
|
- result.queries == expected_queries
|
||||||
|
when:
|
||||||
|
- db_engine == 'mysql'
|
||||||
|
- db_version is version('8.0.23', '>=')
|
||||||
|
vars:
|
||||||
|
expected_queries: ["CHANGE REPLICATION SOURCE TO SOURCE_SSL_VERIFY_SERVER_CERT=0"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue