Created
August 22, 2017 20:52
-
-
Save jfach/8e768aef118ba13160017be2d175a760 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bats | |
@test "RTC present" { | |
run timedatectl status | |
[ "$status" -ne 127] | |
} | |
@test "NTP enabled" { | |
result="$(timedatectl status | grep "Network time on:")" | |
[ "$result" == "Network time on: yes" ] | |
} | |
@test "NTP synchronized" { | |
result="$(timedatectl status | grep "NTP synchronized:")" | |
[ "$result" == "NTP synchronized: yes" ] | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment