mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-26 14:41:24 -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
13a8a4ebff
commit
8968f51533
15 changed files with 61 additions and 38 deletions
|
@ -22,4 +22,4 @@
|
|||
- name: assert message failure (expect failed=true)
|
||||
assert:
|
||||
that:
|
||||
- "output.failed == true"
|
||||
- "output.failed | bool == true"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
- name: assert output message changed value
|
||||
assert:
|
||||
that:
|
||||
- "output.changed == {{ changed }}"
|
||||
- "output.changed | bool == changed | bool"
|
||||
|
||||
- name: run mysql command to show variable
|
||||
command: "{{ mysql_command }} \"-e show variables like '{{ var_name }}'\""
|
||||
|
@ -31,6 +31,6 @@
|
|||
- name: assert output mysql variable name and value
|
||||
assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "result.changed | bool == true"
|
||||
- "'{{ var_name }}' in result.stdout"
|
||||
- "'{{ var_value }}' in result.stdout"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
- name: assert output message changed value
|
||||
assert:
|
||||
that:
|
||||
- "output.changed == {{ changed }}"
|
||||
- "output.changed | bool == changed | bool"
|
||||
|
||||
- set_fact:
|
||||
key_name: "{{ var_name }}"
|
||||
|
@ -35,6 +35,6 @@
|
|||
- name: assert output variable info match mysql variable info
|
||||
assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "result.changed | bool == true"
|
||||
- "key_name in result.stdout"
|
||||
- "key_value in result.stdout"
|
||||
|
|
|
@ -45,12 +45,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_variables:
|
||||
|
|
|
@ -155,15 +155,15 @@
|
|||
mysql_variables:
|
||||
<<: *mysql_params
|
||||
variable: max_connect_errors
|
||||
value: -1
|
||||
value: '-1'
|
||||
register: oor_result
|
||||
ignore_errors: true
|
||||
|
||||
- include: assert_var.yml changed=true output={{ oor_result }} var_name=max_connect_errors var_value=1
|
||||
when: connector.name.0 is not search('pymysql')
|
||||
when: connector_name is not search('pymysql')
|
||||
|
||||
- include: assert_fail_msg.yml output={{ oor_result }} msg='Truncated incorrect'
|
||||
when: connector.name.0 is search('pymysql')
|
||||
when: connector_name is search('pymysql')
|
||||
|
||||
# ============================================================
|
||||
# Verify mysql_variable fails when setting an incorrect value (incorrect type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue