From 8923eb1a7dab59dffdc12081b3b9718dfbbd101a Mon Sep 17 00:00:00 2001 From: Tomas Tomecek Date: Jan 04 2019 11:22:50 +0000 Subject: tests: rework the playbook the match the supported use case include_role doesn't work, logs can't be found Signed-off-by: Tomas Tomecek --- diff --git a/tests/tests.yml b/tests/tests.yml index 266ff96..111356a 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -7,7 +7,7 @@ - python3-pytest - python3-docker hosts: all - tasks: + pre_tasks: - name: check if we are running in a container command: systemctl register: in_host @@ -20,16 +20,14 @@ set_fact: req_pkgs: '{{ req_pkgs }} + [ "docker" ]' when: in_host.rc == 0 - - name: run them tests - include_role: - name: standard-test-basic + roles: + - role: standard-test-basic tags: - classic - vars: - tests: - - unit: - run: pytest-3 -v /usr/libexec/installed-tests/python-docker/tests/unit/ - - integration: - run: pytest-3 -v /usr/libexec/installed-tests/python-docker/tests/integration/ - required_packages: '{{ req_pkgs }}' - required_services: '{{ req_services }}' + tests: + - unit: + run: pytest-3 -v /usr/libexec/installed-tests/python-docker/tests/unit/ + - integration: + run: pytest-3 -v /usr/libexec/installed-tests/python-docker/tests/integration/ + required_packages: '{{ req_pkgs }}' + required_services: '{{ req_services }}'