mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-27 00:11:45 -07:00
Add test for distinct dump with and without compression
This commit is contained in:
parent
5ed8661e6e
commit
4f85e37520
1 changed files with 39 additions and 3 deletions
|
@ -41,11 +41,25 @@
|
||||||
target: /tmp/full-dump.sql.gz
|
target: /tmp/full-dump.sql.gz
|
||||||
register: full_dump_gz
|
register: full_dump_gz
|
||||||
|
|
||||||
- name: Check dumps errors | Check full dumps are changed
|
- name: Check dumps errors | Distinct dump without compression
|
||||||
|
community.mysql.mysql_db:
|
||||||
|
state: dump
|
||||||
|
name: db2
|
||||||
|
target: /tmp/dump-db2.sql
|
||||||
|
register: dump_db2
|
||||||
|
|
||||||
|
- name: Check dumps errors | Distinct dump with gunzip
|
||||||
|
community.mysql.mysql_db:
|
||||||
|
state: dump
|
||||||
|
name: db2
|
||||||
|
target: /tmp/dump-db2.sql.gz
|
||||||
|
register: dump_db2_gz
|
||||||
|
|
||||||
|
- name: Check dumps errors | Check distinct dumps are changed
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
- full_dump is changed
|
- dump_db2 is changed
|
||||||
- full_dump_gz is changed
|
- dump_db2_gz is changed
|
||||||
|
|
||||||
# Now db2.v1 targets an inexistant table so mysqldump will fail
|
# Now db2.v1 targets an inexistant table so mysqldump will fail
|
||||||
- name: Check dumps errors | Drop t1
|
- name: Check dumps errors | Drop t1
|
||||||
|
@ -74,3 +88,25 @@
|
||||||
that:
|
that:
|
||||||
- full_dump_without_t1 is failed
|
- full_dump_without_t1 is failed
|
||||||
- full_dump_without_t1_gz is failed
|
- full_dump_without_t1_gz is failed
|
||||||
|
|
||||||
|
- name: Check dumps errors | Distinct dump after drop t1 without compression
|
||||||
|
community.mysql.mysql_db:
|
||||||
|
state: dump
|
||||||
|
name: db2
|
||||||
|
target: /tmp/dump-db2-without_t1.sql
|
||||||
|
register: dump_db2_without_t1
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: Check dumps errors | Distinct dump after drop t1 with gzip
|
||||||
|
community.mysql.mysql_db:
|
||||||
|
state: dump
|
||||||
|
name: db2
|
||||||
|
target: /tmp/dump-db2-without_t1.sql.gz
|
||||||
|
register: dump_db2_without_t1_gz
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: Check dumps errors | Check full dump
|
||||||
|
ansible.builtin.assert:
|
||||||
|
that:
|
||||||
|
- dump_db2_without_t1 is failed
|
||||||
|
- dump_db2_without_t1_gz is failed
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue