summaryrefslogtreecommitdiff
path: root/tests/cloud_tests/configs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cloud_tests/configs')
-rw-r--r--tests/cloud_tests/configs/modules/ntp.yaml20
-rw-r--r--tests/cloud_tests/configs/modules/ntp_pools.yaml8
-rw-r--r--tests/cloud_tests/configs/modules/ntp_servers.yaml8
3 files changed, 9 insertions, 27 deletions
diff --git a/tests/cloud_tests/configs/modules/ntp.yaml b/tests/cloud_tests/configs/modules/ntp.yaml
index 0d07ef5a..fbef431b 100644
--- a/tests/cloud_tests/configs/modules/ntp.yaml
+++ b/tests/cloud_tests/configs/modules/ntp.yaml
@@ -1,31 +1,21 @@
#
# Emtpy NTP config to setup using defaults
#
-# 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: the verifier should check for any ntp server not 'ubuntu.pool.ntp.org'
-required_features:
- - apt
- - no_ntpdate
- - ubuntu_ntp
cloud_config: |
#cloud-config
ntp:
pools: {}
servers: {}
collect_scripts:
- ntp_installed_empty: |
+ ntp_installed: |
#!/bin/bash
- dpkg -l | grep ntp | wc -l
+ ntpd --version > /dev/null 2>&1
+ echo $?
ntp_conf_dist_empty: |
#!/bin/bash
ls /etc/ntp.conf.dist | wc -l
- ntp_conf_empty: |
+ ntp_conf_pool_list: |
#!/bin/bash
- grep '^pool' /etc/ntp.conf
- ntp_installed_list: |
- #!/bin/bash
- dpkg -l | grep ntp
+ grep 'pool.ntp.org' /etc/ntp.conf | grep -v ^#
# vi: ts=4 expandtab
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
diff --git a/tests/cloud_tests/configs/modules/ntp_servers.yaml b/tests/cloud_tests/configs/modules/ntp_servers.yaml
index 9d1d65ef..d59d45a8 100644
--- a/tests/cloud_tests/configs/modules/ntp_servers.yaml
+++ b/tests/cloud_tests/configs/modules/ntp_servers.yaml
@@ -1,12 +1,7 @@
#
# NTP config using specific servers
#
-# 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'
required_features:
- - apt
- - no_ntpdate
- lsb_release
cloud_config: |
#cloud-config
@@ -17,7 +12,8 @@ cloud_config: |
collect_scripts:
ntp_installed_servers: |
#!/bin/sh
- dpkg -l | grep -c ntp
+ ntpd --version > /dev/null 2>&1
+ echo $?
ntp_conf_dist_servers: |
#!/bin/sh
cat /etc/ntp.conf.dist | wc -l