diff --git a/.github/workflows/ansible-test-plugins.yml b/.github/workflows/ansible-test-plugins.yml index e965423..ea23960 100644 --- a/.github/workflows/ansible-test-plugins.yml +++ b/.github/workflows/ansible-test-plugins.yml @@ -45,12 +45,12 @@ jobs: db_engine_version: mysql:5.7.40 python: 3.8 connector: pymysql==0.7.11 - docker_container: quay.io/mws/community-mysql-test-containers-my57-py38-mysqlclient201-pymysql0711:latest + docker_image: quay.io/mws/community-mysql-test-containers-my57-py38-mysqlclient201-pymysql0711:latest - ansible: stable-2.12 db_engine_version: mysql:5.7.40 python: 3.8 connector: pymysql==0.9.3 - docker_container: quay.io/mws/community-mysql-test-containers-my57-py38-pymysql093:latest + docker_image: quay.io/mws/community-mysql-test-containers-my57-py38-pymysql093:latest # db_engine_version: # - mysql:5.7.40 @@ -169,7 +169,7 @@ jobs: 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 - docker_container: ${{ matrix.docker_container }} + docker-image: ${{ matrix.docker_image }} target-python-version: ${{ matrix.python }} testing-type: integration diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1b8357c..5fa6d68 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ Actually, the makefile only support Podman. I don't have tested with docker yet. The Makefile accept the following options: - ansible: Mandatory version of ansible to install in a venv to run ansible-test. -- docker_container: +- docker_image: The container image to use to run our tests. Those images Dockerfile are in https://github.com/community.mysql-test-containers and then pushed to quay.io: E.G.: `quay.io/mws/community-mysql-test-containers-my57-py38-mysqlclient201-pymysql0711:latest`. Look in the link above for a complete list of available containers. You can also look into `.github/workflows/ansible-test-plugins.yml` Unfortunatly you must provide the right container_image yourself. And you still need to provides db_engine_version, python, etc... because ansible-test won't do black magic to try to detect what we expect. Explicit is better than implicit anyway. @@ -28,10 +28,10 @@ Examples: ```sh # Run all targets -make ansible="stable-2.14" db_engine_version="mysql:5.7.40" connector="pymysql==0.7.10" python="3.8" docker_container="my57-py38-mysqlclient201-pymysql0711" +make ansible="stable-2.14" db_engine_version="mysql:5.7.40" connector="pymysql==0.7.10" python="3.8" docker_image="my57-py38-mysqlclient201-pymysql0711" # A single target -make ansible="stable-2.14" db_engine_version="mysql:5.7.40" connector="pymysql==0.7.10" python="3.8" docker_container="my57-py38-mysqlclient201-pymysql0711" target="test_mysql_db" +make ansible="stable-2.14" db_engine_version="mysql:5.7.40" connector="pymysql==0.7.10" python="3.8" docker_image="my57-py38-mysqlclient201-pymysql0711" target="test_mysql_db" ``` diff --git a/Makefile b/Makefile index 6ccb7c5..c9f9e99 100644 --- a/Makefile +++ b/Makefile @@ -50,9 +50,9 @@ test-integration: python -m venv .venv/$(ansible) source .venv/$(ansible)/bin/activate python -m pip install --disable-pip-version-check --user https://github.com/ansible/ansible/archive/$(ansible).tar.gz ansible-test - -set -x; ansible-test integration $(target) -v --color --coverage --retry-on-error --continue-on-error --diff --docker $(docker_container) --docker-network podman --python $(python); set +x - # -set -x; ansible-test integration $(target) -v --color --coverage --retry-on-error --continue-on-error --diff --docker $(docker_container) --docker-network podman --python $(python); set +x - # -set -x; ansible-test integration $(target) -v --color --coverage --diff --docker $(docker_container) --docker-network podman --docker-terminate never --python $(python); set +x + -set -x; ansible-test integration $(target) -v --color --coverage --retry-on-error --continue-on-error --diff --docker $(docker_image) --docker-network podman --python $(python); set +x + # -set -x; ansible-test integration $(target) -v --color --coverage --retry-on-error --continue-on-error --diff --docker $(docker_image) --docker-network podman --python $(python); set +x + # -set -x; ansible-test integration $(target) -v --color --coverage --diff --docker $(docker_image) --docker-network podman --docker-terminate never --python $(python); set +x rm tests/integration/db_engine_version rm tests/integration/connector podman stop --time 0 --ignore primary diff --git a/run_all_tests.py b/run_all_tests.py index 01d25ee..e64933e 100755 --- a/run_all_tests.py +++ b/run_all_tests.py @@ -73,9 +73,9 @@ def main(): d = tests.get('db_engine_version') p = tests.get('python') c = tests.get('connector') - i = tests.get('docker_container') - make_cmd = f'make ansible="{a}" db_engine_version="{d}" python="{p}" connector="{c}" docker_container="{i}" test-integration' - print(f'Run tests for: Ansible: {a}, DB: {d}, Python: {p}, Connector: {c}, Image: {i}') + i = tests.get('docker_image') + make_cmd = f'make ansible="{a}" db_engine_version="{d}" python="{p}" connector="{c}" docker_image="{i}" test-integration' + print(f'Run tests for: Ansible: {a}, DB: {d}, Python: {p}, Connector: {c}, Docker image: {i}') os.system(make_cmd)