Correct minor issues in test schema

The JSONSchema used to validate the token response had a couple of
issues:

- The domain property schema was wrapped in a domain property
- 'bind' in optional was always present already so no need to add it
  again.

Change-Id: I512e5a041c6ba96fbff71fac1bfdde02f888a582
This commit is contained in:
Brant Knudson 2016-12-05 17:24:31 -06:00
parent 1c60b1539c
commit 8002025375
1 changed files with 7 additions and 10 deletions

View File

@ -199,15 +199,13 @@ class RestfulTestCase(unit.SQLDriverOverrides, rest.RestfulTestCase,
'minItems': 1,
}
properties['domain'] = {
'domain': {
'type': 'object',
'required': ['id', 'name'],
'properties': {
'id': {'type': 'string'},
'name': {'type': 'string'}
},
'additionalProperties': False
}
'type': 'object',
'required': ['id', 'name'],
'properties': {
'id': {'type': 'string'},
'name': {'type': 'string'}
},
'additionalProperties': False
}
elif project_scoped:
properties['is_admin_project'] = {'type': 'boolean'}
@ -247,7 +245,6 @@ class RestfulTestCase(unit.SQLDriverOverrides, rest.RestfulTestCase,
schema['optional'].append('catalog')
elif project_scoped:
schema['required'].append('project')
schema['optional'].append('bind')
schema['optional'].append('catalog')
schema['optional'].append('OS-TRUST:trust')
schema['optional'].append('is_admin_project')