From 2f8be1898ab2c3c8c9443c2f588f71abc1550fb5 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 19 May 2020 08:57:54 +0200 Subject: [PATCH] Move the test into a role So that it can be called from the container-tools module without duplication. For technical reasons this requires calling the test entry script from a different directory, so parameterize it. Rename the test from "browser" to "cockpit-podman" so that it is more descriptive within a module test. Drop the TEST_OS hack, tests of current version recognizes RHEL 8.3 just fine (and in fact depends on it). Related: rhbz#1821193 --- tests/roles/test/tasks/main.yml | 20 ++++++++++++++++++++ tests/run-test.sh | 5 ----- tests/tests.yml | 23 +++-------------------- 3 files changed, 23 insertions(+), 25 deletions(-) create mode 100644 tests/roles/test/tasks/main.yml diff --git a/tests/roles/test/tasks/main.yml b/tests/roles/test/tasks/main.yml new file mode 100644 index 0000000..5a922a5 --- /dev/null +++ b/tests/roles/test/tasks/main.yml @@ -0,0 +1,20 @@ +--- +- include_role: + name: standard-test-source + +- include_role: + name: standard-test-basic + vars: + required_packages: + - cockpit-podman + - cockpit-ws + - git + - libvirt-python3 + - make + - npm + - python3 + tests: + - cockpit-podman: + dir: . + run: "{{ test_script_dir | default('.') }}/browser.sh" + save-files: ["logs/*"] diff --git a/tests/run-test.sh b/tests/run-test.sh index bab1968..0e61adb 100755 --- a/tests/run-test.sh +++ b/tests/run-test.sh @@ -11,11 +11,6 @@ npm install chrome-remote-interface sizzle . /etc/os-release export TEST_OS="${ID}-${VERSION_ID/./-}" -# HACK: upstream tests don't recognize rhel-8-3 yet -if [ "$TEST_OS" = "rhel-8-3" ]; then - export TEST_OS=rhel-8-2 -fi - export TEST_AUDIT_NO_SELINUX=1 RC=0 diff --git a/tests/tests.yml b/tests/tests.yml index 7779f62..2688f2e 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,23 +1,6 @@ --- - hosts: localhost - roles: - - role: standard-test-source - tags: + tags: - always - - - role: standard-test-basic - tags: - - classic - required_packages: - - cockpit-podman - - cockpit-ws - - git - - libvirt-python3 - - make - - npm - - python3 - tests: - - browser: - dir: . - run: ./browser.sh - save-files: ["logs/*"] + roles: + - test