This commit is contained in:
Laurent Indermuehle 2023-01-09 15:40:55 +01:00
commit 6adb71a3ea
No known key found for this signature in database
GPG key ID: 93FA944C9F34DD09
4 changed files with 11 additions and 10 deletions

View file

@ -3,3 +3,4 @@
- name: "{{ role_name }} | Connector | Install python packages" - name: "{{ role_name }} | Connector | Install python packages"
ansible.builtin.pip: ansible.builtin.pip:
name: "{{ connector_name }}" name: "{{ connector_name }}"
state: present

View file

@ -64,8 +64,8 @@
- name: Must fail because login_port default has beed overriden by wrong value from config file - name: Must fail because login_port default has beed overriden by wrong value from config file
assert: assert:
that: that:
- result is failed - result is failed
- result.msg is search("unable to connect to database") - result.msg is search("unable to connect to database")
- name: Create database using default port - name: Create database using default port
mysql_db: mysql_db:
@ -83,7 +83,7 @@
- name: Must not fail because of the default of login_port is correct - name: Must not fail because of the default of login_port is correct
assert: assert:
that: that:
- result is changed - result is changed
- name: Reinit custom config file - name: Reinit custom config file
shell: 'echo "[client]" > {{ config_file }}' shell: 'echo "[client]" > {{ config_file }}'
@ -107,8 +107,8 @@
- name: Must fail because login_host default has beed overriden by wrong value from config file - name: Must fail because login_host default has beed overriden by wrong value from config file
assert: assert:
that: that:
- result is failed - result is failed
- result.msg is search("Can't connect to MySQL server on '{{ fake_host }}'") or result.msg is search("Unknown MySQL server host '{{ fake_host }}'") - result.msg is search("Can't connect to MySQL server on '{{ fake_host }}'") or result.msg is search("Unknown MySQL server host '{{ fake_host }}'")
# Clean up # Clean up
- name: Remove test db - name: Remove test db

View file

@ -49,7 +49,7 @@
- assert: - assert:
that: that:
- result is changed - result is changed
- name: state dump - file name should exist - name: state dump - file name should exist
file: file:
@ -82,7 +82,7 @@
- assert: - assert:
that: that:
- result is changed - result is changed
- name: check encoding of table - name: check encoding of table
ansible.builtin.command: ansible.builtin.command:

View file

@ -444,8 +444,8 @@
register: result register: result
- assert: - assert:
that: that:
- result is failed - result is failed
- result.msg is search('Failed to open file') - result.msg is search('Failed to open file')
- name: Restore with chdir argument, must pass - name: Restore with chdir argument, must pass
mysql_db: mysql_db:
@ -460,7 +460,7 @@
register: result register: result
- assert: - assert:
that: that:
- result is succeeded - result is succeeded
########## ##########
# Clean up # Clean up