mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-27 12:51:26 -07:00
Add healthcheck to MariaDB before starting the tests
This prevent the first test to fail because the db isn't ready yet.
This commit is contained in:
parent
5bd358e553
commit
d781636f32
1 changed files with 14 additions and 4 deletions
18
Makefile
18
Makefile
|
@ -1,4 +1,14 @@
|
|||
.PHONY: test-integration-ansible-2-11-python-3-8-mariadb-10-5
|
||||
test-integration-ansible-2-11-python-3-8-mariadb-10-5:
|
||||
podman run --detach --name mariadb105 --env MARIADB_ROOT_PASSWORD=msandbox --publish 3307:3306 mariadb:10.5
|
||||
ansible-test integration --docker --python 3.8 test_mysql_user
|
||||
.PHONY: test-integration-mariadb-10-5
|
||||
test-integration-mariadb-10-5:
|
||||
podman run \
|
||||
--detach \
|
||||
--name mariadb105 \
|
||||
--env MARIADB_ROOT_PASSWORD=msandbox \
|
||||
--network podman \
|
||||
--publish 3307:3306 \
|
||||
--health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
mariadb:10.5
|
||||
while ! podman healthcheck run mariadb105 && [[ "$$SECONDS" -lt 120 ]]; do sleep 1; done
|
||||
-ansible-test integration test_mysql_db --venv
|
||||
podman stop --time 0 --ignore mariadb105
|
||||
podman rm --ignore mariadb105
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue