Remove attribute values from ConflictsWith validation message
This commit is contained in:
parent
dfa623250a
commit
56a330c533
|
@ -1270,9 +1270,9 @@ func (m schemaMap) validateConflictingAttributes(
|
|||
}
|
||||
|
||||
for _, conflicting_key := range schema.ConflictsWith {
|
||||
if value, ok := c.Get(conflicting_key); ok {
|
||||
if _, ok := c.Get(conflicting_key); ok {
|
||||
return fmt.Errorf(
|
||||
"%q: conflicts with %s (%#v)", k, conflicting_key, value)
|
||||
"%q: conflicts with %s", k, conflicting_key)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4790,7 +4790,7 @@ func TestSchemaMap_Validate(t *testing.T) {
|
|||
|
||||
Err: true,
|
||||
Errors: []error{
|
||||
fmt.Errorf("\"blacklist\": conflicts with whitelist (\"white-val\")"),
|
||||
fmt.Errorf("\"blacklist\": conflicts with whitelist"),
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -4834,7 +4834,7 @@ func TestSchemaMap_Validate(t *testing.T) {
|
|||
|
||||
Err: true,
|
||||
Errors: []error{
|
||||
fmt.Errorf(`"optional_att": conflicts with required_att ("required-val")`),
|
||||
fmt.Errorf(`"optional_att": conflicts with required_att`),
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -4861,8 +4861,8 @@ func TestSchemaMap_Validate(t *testing.T) {
|
|||
|
||||
Err: true,
|
||||
Errors: []error{
|
||||
fmt.Errorf(`"foo_att": conflicts with bar_att ("bar-val")`),
|
||||
fmt.Errorf(`"bar_att": conflicts with foo_att ("foo-val")`),
|
||||
fmt.Errorf(`"foo_att": conflicts with bar_att`),
|
||||
fmt.Errorf(`"bar_att": conflicts with foo_att`),
|
||||
},
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue