mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-23 10:51:25 -07:00
Fix ansible-test unknown option
I copied blindly https://github.com/ansible-collections/community.sops/blob/main/.github/workflows/ansible-test.yml#L195 and forgot what ansible-test was expecting
This commit is contained in:
parent
5bc5ed1cee
commit
fbb0290e19
4 changed files with 12 additions and 12 deletions
6
.github/workflows/ansible-test-plugins.yml
vendored
6
.github/workflows/ansible-test-plugins.yml
vendored
|
@ -45,12 +45,12 @@ jobs:
|
||||||
db_engine_version: mysql:5.7.40
|
db_engine_version: mysql:5.7.40
|
||||||
python: 3.8
|
python: 3.8
|
||||||
connector: pymysql==0.7.11
|
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
|
- ansible: stable-2.12
|
||||||
db_engine_version: mysql:5.7.40
|
db_engine_version: mysql:5.7.40
|
||||||
python: 3.8
|
python: 3.8
|
||||||
connector: pymysql==0.9.3
|
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:
|
# db_engine_version:
|
||||||
# - mysql:5.7.40
|
# - mysql:5.7.40
|
||||||
|
@ -169,7 +169,7 @@ jobs:
|
||||||
echo -n "${{ matrix.db_engine_version }}" > tests/integration/db_engine_version;
|
echo -n "${{ matrix.db_engine_version }}" > tests/integration/db_engine_version;
|
||||||
echo Setting Connector version to "${{ matrix.connector }}"...;
|
echo Setting Connector version to "${{ matrix.connector }}"...;
|
||||||
echo -n "${{ matrix.connector }}" > tests/integration/connector
|
echo -n "${{ matrix.connector }}" > tests/integration/connector
|
||||||
docker_container: ${{ matrix.docker_container }}
|
docker-image: ${{ matrix.docker_image }}
|
||||||
target-python-version: ${{ matrix.python }}
|
target-python-version: ${{ matrix.python }}
|
||||||
testing-type: integration
|
testing-type: integration
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ Actually, the makefile only support Podman. I don't have tested with docker yet.
|
||||||
The Makefile accept the following options:
|
The Makefile accept the following options:
|
||||||
|
|
||||||
- ansible: Mandatory version of ansible to install in a venv to run ansible-test.
|
- 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.:
|
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`
|
`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.
|
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
|
```sh
|
||||||
# Run all targets
|
# 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
|
# 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"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -50,9 +50,9 @@ test-integration:
|
||||||
python -m venv .venv/$(ansible)
|
python -m venv .venv/$(ansible)
|
||||||
source .venv/$(ansible)/bin/activate
|
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
|
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_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_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_image) --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 --diff --docker $(docker_image) --docker-network podman --docker-terminate never --python $(python); set +x
|
||||||
rm tests/integration/db_engine_version
|
rm tests/integration/db_engine_version
|
||||||
rm tests/integration/connector
|
rm tests/integration/connector
|
||||||
podman stop --time 0 --ignore primary
|
podman stop --time 0 --ignore primary
|
||||||
|
|
|
@ -73,9 +73,9 @@ def main():
|
||||||
d = tests.get('db_engine_version')
|
d = tests.get('db_engine_version')
|
||||||
p = tests.get('python')
|
p = tests.get('python')
|
||||||
c = tests.get('connector')
|
c = tests.get('connector')
|
||||||
i = tests.get('docker_container')
|
i = tests.get('docker_image')
|
||||||
make_cmd = f'make ansible="{a}" db_engine_version="{d}" python="{p}" connector="{c}" docker_container="{i}" test-integration'
|
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}, Image: {i}')
|
print(f'Run tests for: Ansible: {a}, DB: {d}, Python: {p}, Connector: {c}, Docker image: {i}')
|
||||||
os.system(make_cmd)
|
os.system(make_cmd)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue