dcos-2524: give more helpful error message for wrong property
This commit is contained in:
@@ -361,8 +361,8 @@ def test_update_missing_field():
|
||||
assert returncode == 1
|
||||
assert stdout == b''
|
||||
assert stderr.decode('utf-8').startswith(
|
||||
"The property 'missing' does not conform to the expected format. "
|
||||
"Possible values are: ")
|
||||
"Error: 'missing' is not a valid property. "
|
||||
"Possible properties are: ")
|
||||
|
||||
|
||||
def test_update_bad_type():
|
||||
|
||||
@@ -119,8 +119,8 @@ def test_update_missing_field():
|
||||
assert returncode == 1
|
||||
assert stdout == b''
|
||||
assert stderr.decode('utf-8').startswith(
|
||||
"The property 'missing' does not conform to the expected format. "
|
||||
"Possible values are: ")
|
||||
"Error: 'missing' is not a valid property. "
|
||||
"Possible properties are: ")
|
||||
|
||||
|
||||
def _remove_group(group_id):
|
||||
|
||||
@@ -59,8 +59,8 @@ def find_parser(key, schema):
|
||||
if key_schema is None:
|
||||
keys = ', '.join(schema['properties'].keys())
|
||||
raise DCOSException(
|
||||
'The property {!r} does not conform to the expected format. '
|
||||
'Possible values are: {}'.format(key, keys))
|
||||
'Error: {!r} is not a valid property. '
|
||||
'Possible properties are: {}'.format(key, keys))
|
||||
else:
|
||||
return ValueTypeParser(key_schema)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user