diff options
| author | Chad Smith <chad.smith@canonical.com> | 2017-11-21 11:43:26 -0700 |
|---|---|---|
| committer | Chad Smith <chad.smith@canonical.com> | 2017-11-21 11:43:26 -0700 |
| commit | 5b974bbab161e6cd73751bf27b7741f6b0d19051 (patch) | |
| tree | f634411a9b12b2e36ff8beefbec39dad21cd45ea /tests/cloud_tests/testcases/modules/set_hostname_fqdn.py | |
| parent | c9c7ff70f55ee024dd54336f07ba52acec1f6929 (diff) | |
| parent | 7624348712b4502f0085d30c05b34dce3f2ceeae (diff) | |
| download | vyos-cloud-init-5b974bbab161e6cd73751bf27b7741f6b0d19051.tar.gz vyos-cloud-init-5b974bbab161e6cd73751bf27b7741f6b0d19051.zip | |
merge from 7624348712b4502f0085d30c05b34dce3f2ceeae at 17.1-41-g76243487
Diffstat (limited to 'tests/cloud_tests/testcases/modules/set_hostname_fqdn.py')
| -rw-r--r-- | tests/cloud_tests/testcases/modules/set_hostname_fqdn.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/cloud_tests/testcases/modules/set_hostname_fqdn.py b/tests/cloud_tests/testcases/modules/set_hostname_fqdn.py index 398f3d40..eb6f0650 100644 --- a/tests/cloud_tests/testcases/modules/set_hostname_fqdn.py +++ b/tests/cloud_tests/testcases/modules/set_hostname_fqdn.py @@ -1,26 +1,31 @@ # This file is part of cloud-init. See LICENSE file for license information. """cloud-init Integration Test Verify Script.""" +from tests.cloud_tests.instances.nocloudkvm import CI_DOMAIN from tests.cloud_tests.testcases import base class TestHostnameFqdn(base.CloudTestCase): """Test Hostname module.""" + ex_hostname = "cloudinit1" + ex_fqdn = "cloudinit2." + CI_DOMAIN + def test_hostname(self): """Test hostname output.""" out = self.get_data_file('hostname') - self.assertIn('myhostname', out) + self.assertIn(self.ex_hostname, out) def test_hostname_fqdn(self): """Test hostname fqdn output.""" out = self.get_data_file('fqdn') - self.assertIn('host.myorg.com', out) + self.assertIn(self.ex_fqdn, out) def test_hosts(self): """Test /etc/hosts file.""" out = self.get_data_file('hosts') - self.assertIn('127.0.1.1 host.myorg.com myhostname', out) + self.assertIn('127.0.1.1 %s %s' % (self.ex_fqdn, self.ex_hostname), + out) self.assertIn('127.0.0.1 localhost', out) # vi: ts=4 expandtab |
