mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-27 12:51:26 -07:00
Re-enable integration tests to validate db_engine_version is fixed
This commit is contained in:
parent
192680888c
commit
9d3ce94e4d
2 changed files with 47 additions and 52 deletions
16
.github/workflows/ansible-test-plugins.yml
vendored
16
.github/workflows/ansible-test-plugins.yml
vendored
|
@ -35,8 +35,7 @@ jobs:
|
|||
# pull-request-change-detection: true
|
||||
|
||||
integration:
|
||||
# name: "Integration (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }}, MySQL: ${{ matrix.db_engine_version }}, Connector: ${{ matrix.connector }})"
|
||||
name: "Integration (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }}, Connector: ${{ matrix.connector }})"
|
||||
name: "Integration (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }}, MySQL: ${{ matrix.db_engine_version }}, Connector: ${{ matrix.connector }})"
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -116,23 +115,20 @@ jobs:
|
|||
run:
|
||||
sleep 20;
|
||||
|
||||
- name: Send Matrix variables to the virtual machine using text files
|
||||
run: >-
|
||||
echo Setting db_engine_version to ${{ matrix.db_engine_version }}...;
|
||||
echo -n "${{ matrix.db_engine_version }}" > tests/integration/db_engine_version;
|
||||
echo Setting Connector version to ${{ matrix.connector }}...;
|
||||
echo -n "${{ matrix.connector }}" > tests/integration/connector
|
||||
|
||||
- name: >-
|
||||
Perform integration testing against
|
||||
Ansible version ${{ matrix.ansible }}
|
||||
under Python ${{ matrix.python }}
|
||||
uses: ansible-community/ansible-test-gh-action@release/v1
|
||||
pre-test-cmd: >-
|
||||
echo Setting db_engine_version to "${{ matrix.db_engine_version }}"...;
|
||||
echo -n "${{ matrix.db_engine_version }}" > tests/integration/db_engine_version;
|
||||
echo Setting Connector version to "${{ matrix.connector }}"...;
|
||||
echo -n "${{ matrix.connector }}" > tests/integration/connector
|
||||
with:
|
||||
ansible-core-version: ${{ matrix.ansible }}
|
||||
target-python-version: ${{ matrix.python }}
|
||||
testing-type: integration
|
||||
target: test_mysql_info
|
||||
|
||||
# units:
|
||||
# runs-on: ubuntu-20.04
|
||||
|
|
83
Makefile
83
Makefile
|
@ -2,45 +2,44 @@
|
|||
test-integration:
|
||||
echo -n mysql:8.0.22 > tests/integration/db_engine_version
|
||||
echo -n pymysql==0.9.3 > tests/integration/connector
|
||||
# podman run \
|
||||
# --detach \
|
||||
# --name primary \
|
||||
# --env MARIADB_ROOT_PASSWORD=msandbox \
|
||||
# --env MYSQL_ROOT_PASSWORD=msandbox \
|
||||
# --network podman \
|
||||
# --publish 3307:3306 \
|
||||
# --health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
# mysql:8.0.22
|
||||
# podman run \
|
||||
# --detach \
|
||||
# --name replica1 \
|
||||
# --env MARIADB_ROOT_PASSWORD=msandbox \
|
||||
# --env MYSQL_ROOT_PASSWORD=msandbox \
|
||||
# --network podman \
|
||||
# --publish 3308:3306 \
|
||||
# --health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
# --security-opt label=disable \
|
||||
# --volume ./tests/integration/targets/setup_mysql/replica1/:/etc/mysql/conf.d/ \
|
||||
# mysql:8.0.22
|
||||
# podman run \
|
||||
# --detach \
|
||||
# --name replica2 \
|
||||
# --env MARIADB_ROOT_PASSWORD=msandbox \
|
||||
# --env MYSQL_ROOT_PASSWORD=msandbox \
|
||||
# --network podman \
|
||||
# --publish 3309:3306 \
|
||||
# --health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
# --security-opt label=disable \
|
||||
# --volume ./tests/integration/targets/setup_mysql/replica2/:/etc/mysql/conf.d/ \
|
||||
# mysql:8.0.22
|
||||
# while ! podman healthcheck run primary && [[ "$$SECONDS" -lt 120 ]]; do sleep 1; done
|
||||
# -set -x; ansible-test integration -v --color --coverage --retry-on-error --continue-on-error --diff --docker --docker-network podman --python 3.8; set +x
|
||||
-set -x; ansible-test integration test_mysql_info -v --color --coverage --diff --docker --docker-network podman --docker-terminate never --python 3.8; set +x
|
||||
# rm tests/integration/db_engine_version
|
||||
# rm tests/integration/connector
|
||||
# podman stop --time 0 --ignore primary
|
||||
# podman stop --time 0 --ignore replica1
|
||||
# podman stop --time 0 --ignore replica2
|
||||
# podman rm --ignore primary
|
||||
# podman rm --ignore replica1
|
||||
# podman rm --ignore replica2
|
||||
podman run \
|
||||
--detach \
|
||||
--name primary \
|
||||
--env MARIADB_ROOT_PASSWORD=msandbox \
|
||||
--env MYSQL_ROOT_PASSWORD=msandbox \
|
||||
--network podman \
|
||||
--publish 3307:3306 \
|
||||
--health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
mysql:8.0.22
|
||||
podman run \
|
||||
--detach \
|
||||
--name replica1 \
|
||||
--env MARIADB_ROOT_PASSWORD=msandbox \
|
||||
--env MYSQL_ROOT_PASSWORD=msandbox \
|
||||
--network podman \
|
||||
--publish 3308:3306 \
|
||||
--health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
--security-opt label=disable \
|
||||
--volume ./tests/integration/targets/setup_mysql/replica1/:/etc/mysql/conf.d/ \
|
||||
mysql:8.0.22
|
||||
podman run \
|
||||
--detach \
|
||||
--name replica2 \
|
||||
--env MARIADB_ROOT_PASSWORD=msandbox \
|
||||
--env MYSQL_ROOT_PASSWORD=msandbox \
|
||||
--network podman \
|
||||
--publish 3309:3306 \
|
||||
--health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
--security-opt label=disable \
|
||||
--volume ./tests/integration/targets/setup_mysql/replica2/:/etc/mysql/conf.d/ \
|
||||
mysql:8.0.22
|
||||
while ! podman healthcheck run primary && [[ "$$SECONDS" -lt 120 ]]; do sleep 1; done
|
||||
-set -x; ansible-test integration -v --color --coverage --retry-on-error --continue-on-error --diff --docker --docker-network podman --python 3.8; set +x
|
||||
rm tests/integration/db_engine_version
|
||||
rm tests/integration/connector
|
||||
podman stop --time 0 --ignore primary
|
||||
podman stop --time 0 --ignore replica1
|
||||
podman stop --time 0 --ignore replica2
|
||||
podman rm --ignore primary
|
||||
podman rm --ignore replica1
|
||||
podman rm --ignore replica2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue