diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index 7a6111a5..b963f7d5 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -53,6 +53,6 @@ else # Only run tests against the new configuration # TODO: don't hard-code this if [[ "${SALT_NODE_ID}" == "servo-master1" ]]; then - ./test.py sls.buildbot.master sls.homu sls.nginx + ./test.py sls.buildbot.master sls.common.timezone sls.homu sls.nginx fi fi diff --git a/common/init.sls b/common/init.sls index 4963ba0a..9d0970fe 100644 --- a/common/init.sls +++ b/common/init.sls @@ -40,6 +40,9 @@ servo: - shell: /bin/bash - home: {{ common.servo_home }} +UTC: + timezone.system + {% for hostname, ip in common.hosts.items() %} host-{{ hostname }}: host.present: diff --git a/tests/sls/common/__init__.py b/tests/sls/common/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/sls/common/timezone.py b/tests/sls/common/timezone.py new file mode 100644 index 00000000..1e5f4675 --- /dev/null +++ b/tests/sls/common/timezone.py @@ -0,0 +1,18 @@ +import subprocess + +from tests.util import Failure, Success + + +def run(): + command = "date | grep -v UTC" + ret = subprocess.run(command, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + universal_newlines=True, + shell=True) + + if ret.returncode == 1: + return Success("Date is in UTC") + else: + return Failure("Date is not in UTC: ", ret.stdout) +