diff --git a/tests/kola/ignition/sysusers/config.fcc b/tests/kola/ignition/sysusers/config.fcc new file mode 100644 index 0000000000..d42a6d19c4 --- /dev/null +++ b/tests/kola/ignition/sysusers/config.fcc @@ -0,0 +1,12 @@ +--- +variant: fcos +version: 1.0.0 +storage: + files: + - path: /etc/zincati/config.d/00-dummy-placeholder.toml + mode: 0644 + user: + name: "zincati" + contents: + inline: | + # Dummy placeholder diff --git a/tests/kola/ignition/sysusers/test.sh b/tests/kola/ignition/sysusers/test.sh new file mode 100755 index 0000000000..9e2030bd48 --- /dev/null +++ b/tests/kola/ignition/sysusers/test.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -euo pipefail + +ok() { + echo "ok" "$@" +} + +fatal() { + echo "$@" >&2 + exit 1 +} + +TARGET="/etc/zincati/config.d/00-dummy-placeholder.toml" +OWNER=$(stat -c '%U' "${TARGET}") + +# make sure the placeholder file is owned by the proper system user. +if test "${OWNER}" != 'zincati' ; then + fatal "unexpected owner of ${TARGET}: ${OWNER}" +fi +ok "placeholder file correctly owned by zincati user"