forked from coreos/fedora-coreos-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: ensure that Ignition warnings are displayed on the console
Follow up to coreos#1621 (review) This adds kola test coverage for displaying Ignition warnings on the console.
- Loading branch information
1 parent
6dc91d2
commit 231df44
Showing
3 changed files
with
35 additions
and
0 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,14 @@ | ||
{ | ||
"ignition": { | ||
"version": "3.3.0" | ||
}, | ||
"systemd": { | ||
"units": [ | ||
{ | ||
"contents": "[Unit]\nDescription=echo service template\n[Service]\nType=oneshot\nExecStart=/bin/echo %i\n", | ||
"enabled": true, | ||
"name": "echo.service" | ||
} | ||
] | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
# kola: { "platforms": "qemu-unpriv" } | ||
# This test ensures that Ignition warnings | ||
# are displayed on the console. | ||
|
||
set -xeuo pipefail | ||
|
||
. $KOLA_EXT_DATA/commonlib.sh | ||
|
||
warningsfile="/etc/issue.d/30_coreos_ignition_warnings.issue" | ||
|
||
# Make sure the motd file gets created | ||
if ! test -f ${warningsfile}; then | ||
fatal "not found ignition warnings issue file" | ||
fi | ||
# Checking for the warning | ||
if ! grep -e 'unit "echo.service" is enabled' ${warningsfile} ; then | ||
fatal "failed to display Ignition warning on the console" | ||
fi | ||
ok "Successfully displayed Ignition warning on the console" |