File: smoke

package info (click to toggle)
cockpit 239-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 67,268 kB
  • sloc: javascript: 245,474; ansic: 72,273; python: 23,634; xml: 6,155; sh: 2,919; makefile: 923; sed: 5
file content (27 lines) | stat: -rwxr-xr-x 702 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
#!/bin/sh
set -e

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

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"