diff options
author | Joshua Powers <josh.powers@canonical.com> | 2017-06-26 10:16:56 -0700 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-06-27 16:25:01 -0400 |
commit | f0529559f9688a397f59f041dc6362e91faf96b6 (patch) | |
tree | 0399406af3a54e1531f37b1d92871141d31c05d1 /tests/cloud_tests/configs/modules/ntp_pools.yaml | |
parent | ecb408afa1104fe49ce6eb1dc5708be56abd5cb2 (diff) | |
download | vyos-cloud-init-f0529559f9688a397f59f041dc6362e91faf96b6.tar.gz vyos-cloud-init-f0529559f9688a397f59f041dc6362e91faf96b6.zip |
tests: update ntp tests after sntp added
Recent change to ntp in artful has added the sntp package whenever
ntp is installed. The tests, rather poorly, did a dpkg -l instead
of checking with `which`. This fixes the ntp tests to all use
`which` over expecting a certain number of lines using dpkg and
as a result make the tests OS independent.
Diffstat (limited to 'tests/cloud_tests/configs/modules/ntp_pools.yaml')
-rw-r--r-- | tests/cloud_tests/configs/modules/ntp_pools.yaml | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/cloud_tests/configs/modules/ntp_pools.yaml b/tests/cloud_tests/configs/modules/ntp_pools.yaml index 7561c7f3..3a93faa2 100644 --- a/tests/cloud_tests/configs/modules/ntp_pools.yaml +++ b/tests/cloud_tests/configs/modules/ntp_pools.yaml @@ -1,15 +1,10 @@ # # NTP config using specific pools # -# NOTE: this should not require apt feature, use 'which' rather than 'dpkg -l' -# NOTE: this should not require no_ntpdate feature, use 'which' to check for -# installation rather than 'dpkg -l', as 'grep ntp' matches 'ntpdate' # NOTE: lsb_release listed here because with recent cloud-init deb with # (LP: 1628337) resolved, cloud-init will attempt to configure archives. # this fails without lsb_release as UNAVAILABLE is used for $RELEASE required_features: - - apt - - no_ntpdate - lsb_release cloud_config: | #cloud-config @@ -21,7 +16,8 @@ cloud_config: | collect_scripts: ntp_installed_pools: | #!/bin/bash - dpkg -l | grep ntp | wc -l + ntpd --version > /dev/null 2>&1 + echo $? ntp_conf_dist_pools: | #!/bin/bash ls /etc/ntp.conf.dist | wc -l |