Skip to content

Commit 3af42d3

Browse files
committed
tests/ignition: update test to current framework
1 parent c20d59f commit 3af42d3

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
---
21
variant: fcos
32
version: 1.0.0
3+
passwd:
4+
users:
5+
- name: usertest
46
storage:
57
files:
6-
- path: /etc/zincati/config.d/00-dummy-placeholder.toml
8+
- path: /etc/usertest/config.d/00-dummy-placeholder.toml
79
mode: 0644
810
user:
9-
name: "zincati"
11+
name: "usertest"
1012
contents:
1113
inline: |
1214
# 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/usertest/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}" != 'usertest' ; 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 usertest user"

0 commit comments

Comments
 (0)