#!/bin/sh # Verify initctl -j status: it has the settings of a service, and gives # the same over D-Bus as over the initctl socket. set -eu TEST_DIR=$(dirname "$0") BUS=/run/finit/bus # Check member $1 of the JSON status in $json assert_json() { assert "$1 is $2" "$(echo "$json" | jq -c "$1")" = "$2" } test_teardown() { say "Running test teardown." run "test -e $BUS.hidden && mv $BUS.hidden $BUS || true" run "rm -f $FINIT_CONF" } # shellcheck source=/dev/null . "$TEST_DIR/lib/setup.sh" run "cat > $FINIT_CONF" <