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/testcases/modules/ntp.py | |
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/testcases/modules/ntp.py')
-rw-r--r-- | tests/cloud_tests/testcases/modules/ntp.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/cloud_tests/testcases/modules/ntp.py b/tests/cloud_tests/testcases/modules/ntp.py index a4b8c3d8..b50e52fe 100644 --- a/tests/cloud_tests/testcases/modules/ntp.py +++ b/tests/cloud_tests/testcases/modules/ntp.py @@ -9,8 +9,8 @@ class TestNtp(base.CloudTestCase): def test_ntp_installed(self): """Test ntp installed""" - out = self.get_data_file('ntp_installed_empty') - self.assertEqual(1, int(out)) + out = self.get_data_file('ntp_installed') + self.assertEqual(0, int(out)) def test_ntp_dist_entries(self): """Test dist config file is empty""" @@ -19,10 +19,7 @@ class TestNtp(base.CloudTestCase): def test_ntp_entires(self): """Test config entries""" - out = self.get_data_file('ntp_conf_empty') - self.assertIn('pool 0.ubuntu.pool.ntp.org iburst', out) - self.assertIn('pool 1.ubuntu.pool.ntp.org iburst', out) - self.assertIn('pool 2.ubuntu.pool.ntp.org iburst', out) - self.assertIn('pool 3.ubuntu.pool.ntp.org iburst', out) + out = self.get_data_file('ntp_conf_pool_list') + self.assertIn('pool.ntp.org iburst', out) # vi: ts=4 expandtab |