Skip to content

Commit

Permalink
tests/ignition: update test to current framework
Browse files Browse the repository at this point in the history
Use `dnsmasq` instead, as rhcos also includes this user.
  • Loading branch information
HuijingHei committed Oct 22, 2023
1 parent c20d59f commit a474453
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions tests/kola/ignition/sysusers/data/commonlib.sh
19 changes: 8 additions & 11 deletions tests/kola/ignition/sysusers/test.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit a474453

Please sign in to comment.