mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-26 14:41:24 -07:00
make integration tests work
This commit is contained in:
parent
a69c0e91d6
commit
778fbd497c
4 changed files with 22 additions and 11 deletions
|
@ -158,7 +158,9 @@
|
|||
assert:
|
||||
that:
|
||||
- result is changed
|
||||
- result.queries == ["CHANGE MASTER TO MASTER_HOST='{{ mysql_host }}',MASTER_USER='{{ replication_user }}',MASTER_PASSWORD='********',MASTER_PORT={{ mysql_primary_port }},MASTER_LOG_FILE='{{ mysql_primary_status.File }}',MASTER_LOG_POS={{ mysql_primary_status.Position }},MASTER_SSL=0,MASTER_SSL_CA=''"]
|
||||
- result.queries == result_query
|
||||
vars:
|
||||
result_query: ["CHANGE MASTER TO MASTER_HOST='{{ mysql_host }}',MASTER_USER='{{ replication_user }}',MASTER_PASSWORD='********',MASTER_PORT={{ mysql_primary_port }},MASTER_LOG_FILE='{{ mysql_primary_status.File }}',MASTER_LOG_POS={{ mysql_primary_status.Position }},MASTER_SSL=0,MASTER_SSL_CA=''"]
|
||||
|
||||
# Test startreplica mode:
|
||||
- name: Start replica
|
||||
|
@ -186,25 +188,31 @@
|
|||
assert:
|
||||
that:
|
||||
- replica_status.Is_Replica == true
|
||||
- replica_status.Master_Host == '{{ mysql_host }}'
|
||||
- replica_status.Master_Host == mysql_host_value
|
||||
- replica_status.Exec_Master_Log_Pos == mysql_primary_status.Position
|
||||
- replica_status.Master_Port == {{ mysql_primary_port }}
|
||||
- replica_status.Master_Port == mysql_primary_port_value
|
||||
- replica_status.Last_IO_Errno == 0
|
||||
- replica_status.Last_IO_Error == ''
|
||||
- replica_status is not changed
|
||||
when: mysql8022_and_higher == false
|
||||
vars:
|
||||
mysql_host_value: "{{ mysql_host }}"
|
||||
mysql_primary_port_value: "{{ mysql_primary_port }}"
|
||||
|
||||
- name: Assert that getreplica returns expected values for MySQL newer than 8.0.22
|
||||
assert:
|
||||
that:
|
||||
- replica_status.Is_Replica == true
|
||||
- replica_status.Source_Host == '{{ mysql_host }}'
|
||||
- replica_status.Source_Host == mysql_host_value
|
||||
- replica_status.Exec_Source_Log_Pos == mysql_primary_status.Position
|
||||
- replica_status.Source_Port == {{ mysql_primary_port }}
|
||||
- replica_status.Source_Port == mysql_primary_port_value
|
||||
- replica_status.Last_IO_Errno == 0
|
||||
- replica_status.Last_IO_Error == ''
|
||||
- replica_status is not changed
|
||||
when: mysql8022_and_higher == true
|
||||
vars:
|
||||
mysql_host_value: "{{ mysql_host }}"
|
||||
mysql_primary_port_value: "{{ mysql_primary_port }}"
|
||||
|
||||
# Create test table and add data to it:
|
||||
- name: Create test table
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue