Skip to content

Commit a474453

Browse files
committed
tests/ignition: update test to current framework
Use `dnsmasq` instead, as rhcos also includes this user.
1 parent c20d59f commit a474453

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
---
21
variant: fcos
3-
version: 1.0.0
2+
version: 1.4.0
43
storage:
54
files:
6-
- path: /etc/zincati/config.d/00-dummy-placeholder.toml
5+
- path: /etc/dnsmasq/config.d/00-dummy-placeholder.toml
76
mode: 0644
87
user:
9-
name: "zincati"
8+
name: "dnsmasq"
109
contents:
1110
inline: |
1211
# Dummy placeholder
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../data/commonlib.sh

tests/kola/ignition/sysusers/test.sh

+8-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
#!/usr/bin/env bash
2-
set -euo pipefail
2+
## kola:
3+
## platforms: qemu
4+
## description: Verify file ownership can reference system users.
35

4-
ok() {
5-
echo "ok" "$@"
6-
}
6+
set -xeuo pipefail
77

8-
fatal() {
9-
echo "$@" >&2
10-
exit 1
11-
}
8+
. "$KOLA_EXT_DATA/commonlib.sh"
129

13-
TARGET="/etc/zincati/config.d/00-dummy-placeholder.toml"
10+
TARGET="/etc/dnsmasq/config.d/00-dummy-placeholder.toml"
1411
OWNER=$(stat -c '%U' "${TARGET}")
1512

1613
# make sure the placeholder file is owned by the proper system user.
17-
if test "${OWNER}" != 'zincati' ; then
14+
if test "${OWNER}" != 'dnsmasq' ; then
1815
fatal "unexpected owner of ${TARGET}: ${OWNER}"
1916
fi
20-
ok "placeholder file correctly owned by zincati user"
17+
ok "placeholder file correctly owned by dnsmasq user"

0 commit comments

Comments
 (0)