parent
c99c9e2d38
commit
931e1be3c3
7 changed files with 102 additions and 1 deletions
33
test/check-starter-kit
Executable file
33
test/check-starter-kit
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/python
|
||||
# Run this with --help to see available options for tracing and debugging
|
||||
# See https://github.com/cockpit-project/cockpit/blob/master/test/common/testlib.py
|
||||
# "class Browser" and "class MachineCase" for the available API.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# import Cockpit's machinery for test VMs and its browser test API
|
||||
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"))
|
||||
import testlib
|
||||
|
||||
|
||||
class TestStarterKit(testlib.MachineCase):
|
||||
def testBasic(self):
|
||||
b = self.browser
|
||||
m = self.machine
|
||||
|
||||
self.login_and_go("/starter-kit")
|
||||
# verify expected heading
|
||||
b.wait_present(".container-fluid h2")
|
||||
b.wait_text(".container-fluid h2", "Starter Kit")
|
||||
|
||||
# verify expected host name
|
||||
hostname = m.execute("hostname").strip()
|
||||
b.wait_present(".container-fluid span")
|
||||
b.wait_text(".container-fluid span", "Running on " + hostname)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
testlib.test_main()
|
||||
4
test/run
Executable file
4
test/run
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#! /bin/bash
|
||||
# This is the expected entry point for Cockpit CI; will be called without
|
||||
# arguments but with an appropriate $TEST_OS
|
||||
make check
|
||||
12
test/vm.install
Normal file
12
test/vm.install
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
# image-customize script to enable cockpit in test VMs
|
||||
# The starter-kit RPM will be installed separately
|
||||
set -eu
|
||||
|
||||
# don't force https:// (self-signed cert)
|
||||
printf "[WebService]\\nAllowUnencrypted=true\\n" > /etc/cockpit/cockpit.conf
|
||||
|
||||
if type firewall-cmd >/dev/null 2>&1; then
|
||||
firewall-cmd --add-service=cockpit --permanent
|
||||
fi
|
||||
systemctl enable cockpit.socket
|
||||
Loading…
Add table
Add a link
Reference in a new issue