Bring up to date with cockpit starter kit

This encompasses a number of changes to the build process.
This commit is contained in:
Justin Stephenson 2023-04-13 11:28:00 -04:00
parent a0fffde59d
commit 235f110ec7
32 changed files with 533 additions and 1172 deletions

View file

@ -13,10 +13,12 @@ import configparser
TEST_DIR = os.path.dirname(__file__)
sys.path.append(os.path.join(TEST_DIR, "common"))
sys.path.append(os.path.join(os.path.dirname(TEST_DIR), "bots/machine"))
from testlib import *
import testlib
# Test with pre-recorded journal files
class TestApplication(MachineCase):
# Nondestructive tests all run in the same running VM. This allows them to run in Packit, Fedora, and RHEL dist-git gating
# They must not permanently change any file or configuration on the system in a way that influences other tests.
@testlib.nondestructive
class TestApplication(testlib.MachineCase):
def _login(self, loc="/session-recording", wait="#app"):
self.login_and_go(loc)
b = self.browser
@ -408,4 +410,4 @@ class TestApplication(MachineCase):
b.wait_present("#app")
if __name__ == "__main__":
test_main()
testlib.test_main()

1
test/reference-image Normal file
View file

@ -0,0 +1 @@
fedora-36

View file

@ -4,5 +4,11 @@ set -eu
# This is the expected entry point for Cockpit CI; will be called without
# arguments but with an appropriate $TEST_OS, and optionally $TEST_SCENARIO
[ -z "${TEST_SCENARIO:-}" ] || export TEST_BROWSER="$TEST_SCENARIO"
TEST_SCENARIO="${TEST_SCENARIO:-}"
[ "${TEST_SCENARIO}" = "${TEST_SCENARIO##firefox}" ] || export TEST_BROWSER=firefox
export RUN_TESTS_OPTIONS=--track-naughties
# linters are off by default for production builds, but we want to run them in CI
export LINT=1
make check

View file

@ -1,7 +1,7 @@
#!/bin/sh
# image-customize script to enable cockpit in test VMs
# The application RPM will be installed separately
set -eu
# image-customize script to prepare a bots VM for testing this application
# The application package will be installed separately
set -eux
# don't force https:// (self-signed cert)
printf "[WebService]\\nAllowUnencrypted=true\\n" > /etc/cockpit/cockpit.conf
@ -11,5 +11,5 @@ if type firewall-cmd >/dev/null 2>&1; then
fi
systemctl enable cockpit.socket
# HACK: See https://github.com/cockpit-project/cockpit/issues/14133
mkdir -p /usr/share/cockpit/packagekit
# needed for testAppMenu
dnf install -y cockpit-packagekit