-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/ignition: update test to current framework
- Loading branch information
1 parent
c20d59f
commit 4ebeb00
Showing
4 changed files
with
26 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
variant: fcos | ||
version: 1.0.0 | ||
passwd: | ||
users: | ||
- name: usertest | ||
shell: "/usr/sbin/nologin" | ||
gecos: "user test" | ||
system: true | ||
storage: | ||
files: | ||
- path: /etc/usertest/config.d/00-dummy-placeholder.toml | ||
mode: 0644 | ||
user: | ||
name: "usertest" | ||
contents: | ||
inline: | | ||
# Dummy placeholder |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../data/commonlib.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/usertest/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}" != 'usertest' ; then | ||
fatal "unexpected owner of ${TARGET}: ${OWNER}" | ||
fi | ||
ok "placeholder file correctly owned by zincati user" | ||
ok "placeholder file correctly owned by usertest user" |