mirror of
https://github.com/coreos/fedora-coreos-config.git
synced 2026-11-03 22:59:47 -09:00
tests/ignition: update test to current framework
Use `dnsmasq` instead, as rhcos also includes this user.
This commit is contained in:
parent
c20d59f111
commit
a474453a98
3 changed files with 12 additions and 15 deletions
|
|
@ -1,12 +1,11 @@
|
|||
---
|
||||
variant: fcos
|
||||
version: 1.0.0
|
||||
version: 1.4.0
|
||||
storage:
|
||||
files:
|
||||
- path: /etc/zincati/config.d/00-dummy-placeholder.toml
|
||||
- path: /etc/dnsmasq/config.d/00-dummy-placeholder.toml
|
||||
mode: 0644
|
||||
user:
|
||||
name: "zincati"
|
||||
name: "dnsmasq"
|
||||
contents:
|
||||
inline: |
|
||||
# Dummy placeholder
|
||||
1
tests/kola/ignition/sysusers/data/commonlib.sh
Symbolic link
1
tests/kola/ignition/sysusers/data/commonlib.sh
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../../data/commonlib.sh
|
||||
|
|
@ -1,20 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
## kola:
|
||||
## platforms: qemu
|
||||
## description: Verify file ownership can reference system users.
|
||||
|
||||
ok() {
|
||||
echo "ok" "$@"
|
||||
}
|
||||
set -xeuo pipefail
|
||||
|
||||
fatal() {
|
||||
echo "$@" >&2
|
||||
exit 1
|
||||
}
|
||||
. "$KOLA_EXT_DATA/commonlib.sh"
|
||||
|
||||
TARGET="/etc/zincati/config.d/00-dummy-placeholder.toml"
|
||||
TARGET="/etc/dnsmasq/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
|
||||
if test "${OWNER}" != 'dnsmasq' ; then
|
||||
fatal "unexpected owner of ${TARGET}: ${OWNER}"
|
||||
fi
|
||||
ok "placeholder file correctly owned by zincati user"
|
||||
ok "placeholder file correctly owned by dnsmasq user"
|
||||
|
|
|
|||
Loading…
Reference in a new issue