Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/kola: Test disabling units via Ignition #1736

Merged
merged 1 commit into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/kola/ignition/systemd-disable/config.bu
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
variant: fcos
version: 1.4.0
systemd:
units:
- name: zincati.service
enabled: false
1 change: 1 addition & 0 deletions tests/kola/ignition/systemd-disable/data/commonlib.sh
19 changes: 19 additions & 0 deletions tests/kola/ignition/systemd-disable/test.sh
Original file line number Diff line number Diff line change
@@ -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"