From 9f88125a25338b70b53a2f5b0af59499f334f261 Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Wed, 10 Oct 2018 19:29:55 +0000 Subject: tests: fix kvm integration test to assert flexible config-disk path Make integration test for flexible using regexp in case disk changes. LP: #1797199 --- tests/cloud_tests/testcases/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/cloud_tests') 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' % -- cgit v1.2.3