Port stable 1 ci changes (#423) (#424)

* 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:
Laurent Indermühle 2022-08-17 11:30:34 +02:00 committed by GitHub
commit 8968f51533
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 61 additions and 38 deletions

View file

@ -14,7 +14,12 @@
- name: Add blank line
shell: 'echo "" >> {{ config_file }}'
when:
- (connector.name.0 is search('pymysql') and connector_ver is version('0.9.3', '>=')) or connector.name.0 is not search('pymysql')
- >
connector_name is not search('pymysql')
or (
connector_name is search('pymysql')
and connector_ver is version('0.9.3', '>=')
)
- name: Create include_dir
file:
@ -22,7 +27,12 @@
state: directory
mode: '0777'
when:
- (connector.name.0 is search('pymysql') and connector_ver is version('0.9.3', '>=')) or connector.name.0 is not search('pymysql')
- >
connector_name is not search('pymysql')
or (
connector_name is search('pymysql')
and connector_ver is version('0.9.3', '>=')
)
- name: Add include_dir
lineinfile:
@ -30,7 +40,12 @@
line: '!includedir {{ include_dir }}'
insertafter: EOF
when:
- (connector.name.0 is search('pymysql') and connector_ver is version('0.9.3', '>=')) or connector.name.0 is not search('pymysql')
- >
connector_name is not search('pymysql')
or (
connector_name is search('pymysql')
and connector_ver is version('0.9.3', '>=')
)
- name: Create database using fake port to connect to, must fail
mysql_db:

View file

@ -46,12 +46,12 @@
- assert:
that:
- result is failed
when: connector.name.0 is search('pymysql')
when: connector_name is search('pymysql')
- assert:
that:
- result is succeeded
when: connector.name.0 is not search('pymysql')
when: connector_name is not search('pymysql')
- name: attempt connection with newly created user ignoring hostname
mysql_db: