diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-01-22 12:09:52 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-01-22 12:09:52 -0500 |
commit | de32623e6b34e3648958f1a08ef721ed9a03f2f8 (patch) | |
tree | d10ae9a3770fad0bdeb83a597523b8d30e259c9e /tests | |
parent | c80892c9c326716724c3ff06d9a82516a4152c74 (diff) | |
parent | 8d453d2a4da4492857a4487b14fe7b11a014115b (diff) | |
download | vyos-cloud-init-de32623e6b34e3648958f1a08ef721ed9a03f2f8.tar.gz vyos-cloud-init-de32623e6b34e3648958f1a08ef721ed9a03f2f8.zip |
merge from trunk
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/test_datasource/test_gce.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/unittests/test_datasource/test_gce.py b/tests/unittests/test_datasource/test_gce.py index 89251b0e..06050bb1 100644 --- a/tests/unittests/test_datasource/test_gce.py +++ b/tests/unittests/test_datasource/test_gce.py @@ -99,7 +99,8 @@ class TestDataSourceGCE(test_helpers.HttprettyTestCase): body=_new_request_callback()) self.ds.get_data() - self.assertEqual(GCE_META.get('instance/hostname'), + shostname = GCE_META.get('instance/hostname').split('.')[0] + self.assertEqual(shostname, self.ds.get_hostname()) self.assertEqual(GCE_META.get('instance/id'), @@ -126,8 +127,8 @@ class TestDataSourceGCE(test_helpers.HttprettyTestCase): self.assertEqual(GCE_META_PARTIAL.get('instance/id'), self.ds.get_instance_id()) - self.assertEqual(GCE_META_PARTIAL.get('instance/hostname'), - self.ds.get_hostname()) + shostname = GCE_META_PARTIAL.get('instance/hostname').split('.')[0] + self.assertEqual(shostname, self.ds.get_hostname()) @httpretty.activate def test_metadata_encoding(self): |