sync tempest tests
Change-Id: I54c7809aff28921d550190ae3d26fa8c24233782
This commit is contained in:
parent
805f7c5d96
commit
e08334e635
@ -179,7 +179,7 @@ class TestResource(BaseVitrageTempest):
|
||||
|
||||
sorted_cli_resources = sorted(
|
||||
json.loads(cli_resources),
|
||||
key=lambda resource: resource["vitrage_id"])
|
||||
key=lambda resource: resource["ID"])
|
||||
sorted_api_resources = sorted(
|
||||
api_resources,
|
||||
key=lambda resource: resource["vitrage_id"])
|
||||
@ -190,10 +190,19 @@ class TestResource(BaseVitrageTempest):
|
||||
|
||||
for cli_resource, api_resource in \
|
||||
zip(sorted_cli_resources, sorted_api_resources):
|
||||
for item in self.properties:
|
||||
self.assertEqual(cli_resource.get(item).lower(),
|
||||
api_resource.get(item).lower(),
|
||||
'for item %s' % item)
|
||||
|
||||
self.assertEqual(
|
||||
cli_resource.get("ID").lower(),
|
||||
api_resource.get(VProps.VITRAGE_ID).lower())
|
||||
self.assertEqual(
|
||||
cli_resource.get("Type").lower(),
|
||||
api_resource.get(VProps.VITRAGE_TYPE).lower())
|
||||
self.assertEqual(
|
||||
cli_resource.get("Data Source ID").lower(),
|
||||
api_resource.get(VProps.ID).lower())
|
||||
self.assertEqual(
|
||||
cli_resource.get("State").lower(),
|
||||
api_resource.get(VProps.VITRAGE_OPERATIONAL_STATE).lower())
|
||||
|
||||
def _compare_resource_show(self, api_resource_show,
|
||||
cli_resource_show):
|
||||
|
@ -24,7 +24,6 @@ import os
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user