diff options
author | Chad Smith <chad.smith@canonical.com> | 2018-10-10 19:29:55 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2018-10-10 19:29:55 +0000 |
commit | 9f88125a25338b70b53a2f5b0af59499f334f261 (patch) | |
tree | e661c9de39fb852cd1c6084a9912411fc01c054a | |
parent | 6ee8a2c557ccdc8be54bcf8a8762800c10f3ef49 (diff) | |
download | vyos-cloud-init-9f88125a25338b70b53a2f5b0af59499f334f261.tar.gz vyos-cloud-init-9f88125a25338b70b53a2f5b0af59499f334f261.zip |
tests: fix kvm integration test to assert flexible config-disk path
Make integration test for flexible using regexp in case disk changes.
LP: #1797199
-rw-r--r-- | tests/cloud_tests/testcases/base.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/cloud_tests/testcases/base.py b/tests/cloud_tests/testcases/base.py index 16b268ef..bbd80ae1 100644 --- a/tests/cloud_tests/testcases/base.py +++ b/tests/cloud_tests/testcases/base.py @@ -262,7 +262,10 @@ class CloudTestCase(unittest2.TestCase): self.assertItemsEqual([], instance_data['base64_encoded_keys']) self.assertEqual('unknown', v1_data['cloud_name']) self.assertEqual('nocloud', v1_data['platform']) - self.assertEqual('config-disk (/dev/vda)', v1_data['subplatform']) + subplatform = v1_data['subplatform'] + self.assertIsNotNone( + re.match(r'config-disk \(\/dev\/[a-z]{3}\)', subplatform), + 'kvm subplatform "%s" != "config-disk (/dev/...)"' % subplatform) self.assertIsNone( v1_data['availability_zone'], 'found unexpected kvm availability_zone %s' % |