diff --git a/tests/kola/ignition/systemd-disable/config.bu b/tests/kola/ignition/systemd-disable/config.bu new file mode 100644 index 0000000000..5b198c4128 --- /dev/null +++ b/tests/kola/ignition/systemd-disable/config.bu @@ -0,0 +1,6 @@ +variant: fcos +version: 1.4.0 +systemd: + units: + - name: zincati.service + enabled: false diff --git a/tests/kola/ignition/systemd-disable/data/commonlib.sh b/tests/kola/ignition/systemd-disable/data/commonlib.sh new file mode 120000 index 0000000000..b8dcbdca1a --- /dev/null +++ b/tests/kola/ignition/systemd-disable/data/commonlib.sh @@ -0,0 +1 @@ +../../../data/commonlib.sh \ No newline at end of file diff --git a/tests/kola/ignition/systemd-disable/test.sh b/tests/kola/ignition/systemd-disable/test.sh new file mode 100755 index 0000000000..404ce44595 --- /dev/null +++ b/tests/kola/ignition/systemd-disable/test.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# kola: { "distros": "fcos", "platforms": "qemu-unpriv" } +# This test makes sure that ignition is able to disable units +# https://github.com/coreos/fedora-coreos-tracker/issues/392 + +# We don't need to test this on every platform. If it passes in +# one place it will pass everywhere. +# This test is currently scoped to FCOS because `zincati` is only available on +# FCOS. +# TODO-RHCOS: Determine if any services on RHCOS may be disabled and adapt test + +set -xeuo pipefail + +. $KOLA_EXT_DATA/commonlib.sh + +if [ "$(systemctl is-enabled zincati.service)" != 'disabled' ]; then + fatal "zincati.service systemd unit should be disabled" +fi +ok "zincati.service systemd unit is enabled"