From f639e531f9357e1a42ce7a050726d520c1586535 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 14 Nov 2018 09:40:02 +0100 Subject: [PATCH] Run initial upstream integration test check-menu is a very robust test that also does not change the host too much. This does not cover a lot of functionality to actually find regressions in subsystems, but exposes the missing pieces for running more integration tests in the dist-git pipeline. Re-use the cockpit/tests container for this, which has the necessary test dependencies -- most importantly, chromium-browser. Aside from not being available in RHEL, this also better shields the tests from the tested system. The container talks to Cockpit on the host, i. e. the container's gateway. Use a fixed tag to avoid running into failures with "latest", as we don't gate container updates on the dist-git tests for now. --- tests/tests.yml | 6 ++++++ tests/verify.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100755 tests/verify.sh diff --git a/tests/tests.yml b/tests/tests.yml index 5c8638c..422c0bd 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -11,7 +11,13 @@ - classic required_packages: - cockpit + - cockpit-tests + - cockpit-dashboard + - podman tests: - smoke: dir: ./source/tools/debian/tests/ run: ./smoke + - verify: + dir: . + run: ./verify.sh diff --git a/tests/verify.sh b/tests/verify.sh new file mode 100755 index 0000000..9002f8b --- /dev/null +++ b/tests/verify.sh @@ -0,0 +1,45 @@ +#!/bin/sh +set -eux + +# HACK: this should be a var: https://pagure.io/standard-test-roles/issue/263 +SOURCE=/var/str/source + +# HACK: reset the journal (tests should only look at the relevant portion) +rm -rf /var/log/journal/* +systemctl restart systemd-journald + +# create user account for logging in +if ! id admin 2>/dev/null; then + useradd admin -G wheel + echo admin:foobar | chpasswd +fi + +# The cockpit/tests container has chromium-browser and other test +# dependencies, which we don't have on RHEL itself. Also, we don't actually +# want to install these on the tested image, so run the test in a container, +# which tests the host. Use a fixed tag to avoid running into failures with +# "latest", as we don't gate container updates on the dist-git tests for now. +RC=0 +cat <