Re-add functional tests on flavor content

A new keystoneauth release is out that fixes authenticated
discovery, meaning we'll pick up new server microversion,
which means we can start testing for such in our server
functional test.

Depends-On: https://review.opendev.org/690876
Change-Id: I51b7fd28f3469a5718057ece2f29f3655ef717e4
This commit is contained in:
Monty Taylor 2019-10-04 18:18:15 +02:00
parent 9874fa81d7
commit 25674ccd45
3 changed files with 6 additions and 10 deletions

View File

@ -14,7 +14,7 @@ jmespath==0.9.0
jsonpatch==1.16
jsonpointer==1.13
jsonschema==2.6.0
keystoneauth1==3.16.0
keystoneauth1==3.18.0
linecache2==1.0.0
mock==2.0.0
mox3==0.20.0

View File

@ -49,15 +49,13 @@ class TestInventory(base.BaseFunctionalTest):
def _test_host_content(self, host):
self.assertEqual(host['image']['id'], self.image.id)
self.assertNotIn('links', host['image'])
# TODO(mordred) Add this back wnen ksa releases
# self.assertNotIn('id', host['flavor'])
self.assertNotIn('id', host['flavor'])
self.assertNotIn('links', host['flavor'])
self.assertNotIn('links', host)
self.assertIsInstance(host['volumes'], list)
self.assertIsInstance(host['metadata'], dict)
self.assertIn('interface_ip', host)
# TODO(mordred) Add this back wnen ksa releases
# self.assertIn('ram', host['flavor'])
self.assertIn('ram', host['flavor'])
def _test_expanded_host_content(self, host):
self.assertEqual(host['image']['name'], self.image.name)
@ -84,12 +82,10 @@ class TestInventory(base.BaseFunctionalTest):
self.assertEqual(host['image']['id'], self.image.id)
self.assertNotIn('links', host['image'])
self.assertNotIn('name', host['name'])
# TODO(mordred) Add this back wnen ksa releases
# self.assertNotIn('id', host['flavor'])
self.assertNotIn('id', host['flavor'])
self.assertNotIn('links', host['flavor'])
self.assertNotIn('name', host['flavor'])
# TODO(mordred) Add this back wnen ksa releases
# self.assertIn('ram', host['flavor'])
self.assertIn('ram', host['flavor'])
host_found = False
for host in self.inventory.list_hosts(expand=False):

View File

@ -8,7 +8,7 @@ requestsexceptions>=1.2.0 # Apache-2.0
jsonpatch!=1.20,>=1.16 # BSD
six>=1.10.0 # MIT
os-service-types>=1.7.0 # Apache-2.0
keystoneauth1>=3.16.0 # Apache-2.0
keystoneauth1>=3.18.0 # Apache-2.0
munch>=2.1.0 # MIT
decorator>=3.4.0 # BSD