Disable tests to concentrate on the \n and quote issue with my files

This commit is contained in:
Laurent Indermuehle 2023-01-06 09:37:26 +01:00
commit a0a0493a0a
No known key found for this signature in database
GPG key ID: 93FA944C9F34DD09
2 changed files with 78 additions and 74 deletions

View file

@ -82,40 +82,47 @@ jobs:
- python: 3.9 - python: 3.9
ansible: stable-2.12 ansible: stable-2.12
services: # services:
db_primary: # db_primary:
image: ${{ matrix.db_engine_version }} # image: ${{ matrix.db_engine_version }}
env: # env:
MARIADB_ROOT_PASSWORD: msandbox # MARIADB_ROOT_PASSWORD: msandbox
MYSQL_ROOT_PASSWORD: msandbox # MYSQL_ROOT_PASSWORD: msandbox
ports: # ports:
- 3307:3306 # - 3307:3306
db_replica1: # db_replica1:
image: ${{ matrix.db_engine_version }} # image: ${{ matrix.db_engine_version }}
env: # env:
MARIADB_ROOT_PASSWORD: msandbox # MARIADB_ROOT_PASSWORD: msandbox
MYSQL_ROOT_PASSWORD: msandbox # MYSQL_ROOT_PASSWORD: msandbox
ports: # ports:
- 3308:3306 # - 3308:3306
volumes: # volumes:
- ${{ github.workspace }}/tests/integration/setup_mysql/replica1/:/etc/mysql/conf.d/ # - ${{ github.workspace }}/tests/integration/setup_mysql/replica1/:/etc/mysql/conf.d/
db_replica2: # db_replica2:
image: ${{ matrix.db_engine_version }} # image: ${{ matrix.db_engine_version }}
env: # env:
MARIADB_ROOT_PASSWORD: msandbox # MARIADB_ROOT_PASSWORD: msandbox
MYSQL_ROOT_PASSWORD: msandbox # MYSQL_ROOT_PASSWORD: msandbox
ports: # ports:
- 3309:3306 # - 3309:3306
volumes: # volumes:
- ${{ github.workspace }}/tests/integration/setup_mysql/replica2/:/etc/mysql/conf.d/ # - ${{ github.workspace }}/tests/integration/setup_mysql/replica2/:/etc/mysql/conf.d/
steps: steps:
- name: 'Wait 20s for the service containers to be healthy' - name: 'Wait 20s for the service containers to be healthy'
run: run:
sleep 20; 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: >- - name: >-
Perform integration testing against Perform integration testing against
Ansible version ${{ matrix.ansible }} Ansible version ${{ matrix.ansible }}
@ -123,13 +130,9 @@ jobs:
uses: ansible-community/ansible-test-gh-action@release/v1 uses: ansible-community/ansible-test-gh-action@release/v1
with: with:
ansible-core-version: ${{ matrix.ansible }} ansible-core-version: ${{ matrix.ansible }}
pre-test-cmd: >-
>&2 echo Setting db_engine_version to ${{ matrix.db_engine_version }}...;
echo -n "${{ matrix.db_engine_version }}" > tests/integration/db_engine_version;
>&2 echo Setting Connector version to ${{ matrix.connector }}...;
echo -n "${{ matrix.connector }}" > tests/integration/connector
target-python-version: ${{ matrix.python }} target-python-version: ${{ matrix.python }}
testing-type: integration testing-type: integration
target: test_mysql_info
# units: # units:
# runs-on: ubuntu-20.04 # runs-on: ubuntu-20.04

View file

@ -1,45 +1,46 @@
.PHONY: test-integration .PHONY: test-integration
test-integration: test-integration:
echo -n "mysql:8.0.22" > tests/integration/db_engine_version echo -n mysql:8.0.22 > tests/integration/db_engine_version
echo -n "pymysql==0.9.3" > tests/integration/connector echo -n pymysql==0.9.3 > tests/integration/connector
podman run \ # podman run \
--detach \ # --detach \
--name primary \ # --name primary \
--env MARIADB_ROOT_PASSWORD=msandbox \ # --env MARIADB_ROOT_PASSWORD=msandbox \
--env MYSQL_ROOT_PASSWORD=msandbox \ # --env MYSQL_ROOT_PASSWORD=msandbox \
--network podman \ # --network podman \
--publish 3307:3306 \ # --publish 3307:3306 \
--health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \ # --health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
mysql:8.0.22 # mysql:8.0.22
podman run \ # podman run \
--detach \ # --detach \
--name replica1 \ # --name replica1 \
--env MARIADB_ROOT_PASSWORD=msandbox \ # --env MARIADB_ROOT_PASSWORD=msandbox \
--env MYSQL_ROOT_PASSWORD=msandbox \ # --env MYSQL_ROOT_PASSWORD=msandbox \
--network podman \ # --network podman \
--publish 3308:3306 \ # --publish 3308:3306 \
--health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \ # --health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
--security-opt label=disable \ # --security-opt label=disable \
--volume ./tests/integration/targets/setup_mysql/replica1/:/etc/mysql/conf.d/ \ # --volume ./tests/integration/targets/setup_mysql/replica1/:/etc/mysql/conf.d/ \
mysql:8.0.22 # mysql:8.0.22
podman run \ # podman run \
--detach \ # --detach \
--name replica2 \ # --name replica2 \
--env MARIADB_ROOT_PASSWORD=msandbox \ # --env MARIADB_ROOT_PASSWORD=msandbox \
--env MYSQL_ROOT_PASSWORD=msandbox \ # --env MYSQL_ROOT_PASSWORD=msandbox \
--network podman \ # --network podman \
--publish 3309:3306 \ # --publish 3309:3306 \
--health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \ # --health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
--security-opt label=disable \ # --security-opt label=disable \
--volume ./tests/integration/targets/setup_mysql/replica2/:/etc/mysql/conf.d/ \ # --volume ./tests/integration/targets/setup_mysql/replica2/:/etc/mysql/conf.d/ \
mysql:8.0.22 # mysql:8.0.22
while ! podman healthcheck run primary && [[ "$$SECONDS" -lt 120 ]]; do sleep 1; done # 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 -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 -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/connector # rm tests/integration/db_engine_version
podman stop --time 0 --ignore primary # rm tests/integration/connector
podman stop --time 0 --ignore replica1 # podman stop --time 0 --ignore primary
podman stop --time 0 --ignore replica2 # podman stop --time 0 --ignore replica1
podman rm --ignore primary # podman stop --time 0 --ignore replica2
podman rm --ignore replica1 # podman rm --ignore primary
podman rm --ignore replica2 # podman rm --ignore replica1
# podman rm --ignore replica2