Commit 897c9d8d authored by Louis-Philippe Véronneau's avatar Louis-Philippe Véronneau

finalise motd unit test

parent 59a89b76
......@@ -20,9 +20,7 @@ bash:
motd:
script:
- cat /etc/motd
- ansible-playbook tests/motd.yml
- cat /etc/motd
- sh /etc/profile.d/showcpu.sh
- sh /etc/profile.d/showrelease.sh
- sh /etc/profile.d/uptime.sh
- >
ansible-playbook tests/motd.yml --extra-vars "conference_name='Seo Oden Prize Award'
conference_town='Ieu Eun' conference_country=A-Io"
- sh tests/motd/unit_test.sh
This machine is configured with ansible. Please refrain from modifing files
locally if you can.
.''`. Seo Oden Prize Award infrastructure machine
: :` :
`. `'` Ieu Eun, A-Io
`-
--
#!/bin/sh
# This is a unit test for the motd
# Test if the motd is set correctly
diff /etc/motd tests/motd/good_motd.txt && exit || echo "motd not set correctly" && exit 1
# Test if the 3 scripts we use for the motd fail
p="/etc/profile.d"
sh $p/showcpu.sh >/dev/null && exit || echo "error in script $p/showcpu.sh" && exit 1
sh $p/showrelease.sh >/dev/null && exit || echo "error in script $p/showrelease.sh" && exit 1
sh $p/uptime.sh >/dev/null && exit || echo "error in script $p/uptime.sh" && exit 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment