File: smoke

package info (click to toggle)
cockpit 355-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 311,568 kB
  • sloc: javascript: 774,787; python: 40,655; ansic: 35,157; cpp: 11,141; sh: 3,512; makefile: 580; xml: 261
file content (36 lines) | stat: -rwxr-xr-x 1,107 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
set -e

trap 'if [ "$?" -ne 0 ]; then id cockpit-systemd-service || true; systemctl --all | grep cockpit; sudo journalctl -b; fi' EXIT

check_out() {
    echo "$OUT" | grep -q "$1" || {
        echo "output does not match '$1'" >&2
        exit 1
    }
}

echo " * bridge works and has expected packages"
OUT=$(cockpit-bridge --packages)
echo "$OUT"
check_out "^base1.* /usr/share/cockpit/base1"
check_out "^system"
check_out "^users"

# on an RPM based system we expect cockpit.socket not to be enabled by default;
# on a Debian-based system we do
if rpm -q cockpit >/dev/null 2>&1; then
    systemctl start cockpit.socket
fi

# HACK: debian stable kernel+LXC (running on ci.d.n) breaks DynamicUser=
# https://bugs.debian.org/1073815
if uname -r | grep -q ^6.1 && systemd-detect-virt --container; then
    echo "skipping socket test with LXC on Debian 12, https://bugs.debian.org/1073815"
    exit 0
fi

echo " * socket unit is set up correctly, login page available"
OUT=$(curl --silent --show-error --insecure https://localhost:9090)
check_out "login-user-input.*User"
echo "smoke test passed"