Integration tests: split up Docker setup, move docker_compose tests into own group (#718)

* Rename setup role.

* Create new CI group 6, and move docker_compose v1 tests into there.

* Split up Docker setup in integration tests.

* Change setup_docker_compose_v1 to install its own Docker SDK for Python.

* Docker SDK for Python not needed to set up registry or query host info.
This commit is contained in:
Felix Fontein
2023-12-09 17:35:54 +01:00
committed by GitHub
parent 80e39f84d8
commit 4929ef603a
86 changed files with 334 additions and 67 deletions
@@ -3,4 +3,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
needs/target/setup_docker
needs/target/setup_docker_current_container_network_ip
needs/target/setup_openssl
@@ -5,5 +5,7 @@
dependencies:
#- setup_docker -- done in setup.yml, to work around cleanup problems!
#- setup_docker_current_container_network_ip
- setup_docker_python_deps
- setup_openssl
- setup_remote_tmp_dir
@@ -16,6 +16,10 @@
include_role:
name: setup_docker
- name: Figure out current container's network IP
include_role:
name: setup_docker_current_container_network_ip
- name: Create random name prefix and test registry name
set_fact:
docker_registry_container_name_registry: '{{ ''ansible-docker-test-registry-%0x'' % ((2**32) | random) }}'
@@ -36,10 +40,10 @@
- debug:
msg: Using test registry name {{ docker_registry_container_name_registry }} and nginx frontend names {{ docker_registry_container_name_nginx }} and {{ docker_registry_container_name_nginx2 }}
- fail: msg="Too old docker / docker-py version to set up docker registry!"
when: not(docker_py_version is version('1.8.0', '>=') and docker_api_version is version('1.25', '>=')) and (ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 6)
- fail: msg="Too old docker version to set up docker registry!"
when: not(docker_api_version is version('1.25', '>=')) and (ansible_distribution != 'CentOS' or ansible_distribution_major_version|int > 6)
- when: docker_py_version is version('1.8.0', '>=') and docker_api_version is version('1.25', '>=')
- when: docker_api_version is version('1.25', '>=')
block:
# Set up registry container