summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Watkins <daniel.watkins@canonical.com>2015-07-06 15:33:33 +0100
committerDaniel Watkins <daniel.watkins@canonical.com>2015-07-06 15:33:33 +0100
commitafb5421ee717174b989bfed61333f2073b3f3f50 (patch)
treea3af684ab26c038ce9cb2cb758aafa873072d7f1 /tests
parent33e1f251aa2ff75475fe0f02f1e344dbe949d89d (diff)
downloadvyos-cloud-init-afb5421ee717174b989bfed61333f2073b3f3f50.tar.gz
vyos-cloud-init-afb5421ee717174b989bfed61333f2073b3f3f50.zip
Return a sensible value for DataSourceGCE.availability_zone.
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_datasource/test_gce.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unittests/test_datasource/test_gce.py b/tests/unittests/test_datasource/test_gce.py
index 98b68f09..fa714070 100644
--- a/tests/unittests/test_datasource/test_gce.py
+++ b/tests/unittests/test_datasource/test_gce.py
@@ -159,3 +159,8 @@ class TestDataSourceGCE(test_helpers.HttprettyTestCase):
self.ds.get_data()
self.assertEqual([key_content], self.ds.get_public_ssh_keys())
+
+ def test_only_last_part_of_zone_used_for_availability_zone(self):
+ _set_mock_metadata()
+ self.ds.get_data()
+ self.assertEqual('bar', self.ds.availability_zone)