Merge "Add response schema validation for show_default_group_type"

This commit is contained in:
Zuul 2020-07-28 04:58:58 +00:00 committed by Gerrit Code Review
commit 03b20d858a
2 changed files with 13 additions and 1 deletions

View File

@ -73,6 +73,18 @@ show_group_type = {
}
}
show_default_group_type = {
'status_code': [200],
'response_body': {
'type': 'object',
'properties': {
'group_type': common_show_group_type
},
'additionalProperties': False,
'required': ['group_type']
}
}
update_group_type = {
'status_code': [200],
'response_body': {

View File

@ -73,7 +73,7 @@ class GroupTypesClient(base_client.BaseClient):
url = 'group_types/default'
resp, body = self.get(url)
body = json.loads(body)
self.expected_success(200, resp.status)
self.validate_response(schema.show_default_group_type, resp, body)
return rest_client.ResponseBody(resp, body)
def show_group_type(self, group_type_id):