summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional/identity
diff options
context:
space:
mode:
authorSteve Martinelli <s.martinelli@gmail.com>2017-01-24 00:10:51 -0500
committerSteve Martinelli <s.martinelli@gmail.com>2017-01-25 13:09:16 -0800
commit42ac82b1a4970da688ea8fe6c1eb35c87bae8652 (patch)
treee431bc9a7336f561849395c28f5fb723226d858c /openstackclient/tests/functional/identity
parentb69b539a422860bfb402093ff9d93a1b6e338b26 (diff)
downloadpython-openstackclient-42ac82b1a4970da688ea8fe6c1eb35c87bae8652.tar.gz
change assert_show_fields to not fail on new fields
whenever a resource adds a field (which is allowed in our API guidelines), OSC functional tests fail, because we validate the resource keys to a hardcoded list. instead, this change proposes that the logic of assert_show_fields is flipped around, so our hardcoded list acts as a minimum set of values that must appear in the resource. as part of this change, some fields were remove from the constants since they were not actually in the returned data. also, delete unused code `assert_show_structure`. Change-Id: I8c0f0e80ea472f9c7f93c5f1f0ae52048e6cd7da
Diffstat (limited to 'openstackclient/tests/functional/identity')
-rw-r--r--openstackclient/tests/functional/identity/v2/common.py9
-rw-r--r--openstackclient/tests/functional/identity/v3/common.py8
2 files changed, 8 insertions, 9 deletions
diff --git a/openstackclient/tests/functional/identity/v2/common.py b/openstackclient/tests/functional/identity/v2/common.py
index b390c5bc..ad02f779 100644
--- a/openstackclient/tests/functional/identity/v2/common.py
+++ b/openstackclient/tests/functional/identity/v2/common.py
@@ -22,14 +22,13 @@ BASIC_LIST_HEADERS = ['ID', 'Name']
class IdentityTests(base.TestCase):
"""Functional tests for Identity commands. """
- USER_FIELDS = ['email', 'enabled', 'id', 'name', 'project_id',
- 'username', 'domain_id', 'default_project_id']
- PROJECT_FIELDS = ['enabled', 'id', 'name', 'description', 'domain_id']
+ USER_FIELDS = ['email', 'enabled', 'id', 'name', 'project_id', 'username']
+ PROJECT_FIELDS = ['enabled', 'id', 'name', 'description']
TOKEN_FIELDS = ['expires', 'id', 'project_id', 'user_id']
- ROLE_FIELDS = ['id', 'name', 'links', 'domain_id']
+ ROLE_FIELDS = ['id', 'name', 'domain_id']
SERVICE_FIELDS = ['id', 'enabled', 'name', 'type', 'description']
ENDPOINT_FIELDS = ['id', 'region', 'service_id', 'service_name',
- 'service_type', 'enabled', 'publicurl',
+ 'service_type', 'publicurl',
'adminurl', 'internalurl']
EC2_CREDENTIALS_FIELDS = ['access', 'project_id', 'secret',
diff --git a/openstackclient/tests/functional/identity/v3/common.py b/openstackclient/tests/functional/identity/v3/common.py
index 3b6fc27b..a509574c 100644
--- a/openstackclient/tests/functional/identity/v3/common.py
+++ b/openstackclient/tests/functional/identity/v3/common.py
@@ -23,15 +23,15 @@ BASIC_LIST_HEADERS = ['ID', 'Name']
class IdentityTests(base.TestCase):
"""Functional tests for Identity commands. """
- DOMAIN_FIELDS = ['description', 'enabled', 'id', 'name', 'links']
- GROUP_FIELDS = ['description', 'domain_id', 'id', 'name', 'links']
+ DOMAIN_FIELDS = ['description', 'enabled', 'id', 'name']
+ GROUP_FIELDS = ['description', 'domain_id', 'id', 'name']
TOKEN_FIELDS = ['expires', 'id', 'project_id', 'user_id']
USER_FIELDS = ['email', 'enabled', 'id', 'name', 'name',
'domain_id', 'default_project_id', 'description',
'password_expires_at']
PROJECT_FIELDS = ['description', 'id', 'domain_id', 'is_domain',
- 'enabled', 'name', 'parent_id', 'links']
- ROLE_FIELDS = ['id', 'name', 'links', 'domain_id']
+ 'enabled', 'name', 'parent_id']
+ ROLE_FIELDS = ['id', 'name', 'domain_id']
SERVICE_FIELDS = ['id', 'enabled', 'name', 'type', 'description']
REGION_FIELDS = ['description', 'enabled', 'parent_region', 'region']
ENDPOINT_FIELDS = ['id', 'region', 'region_id', 'service_id',