-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
relaxed contain rule so exports of different kinds can overlap in subjects #25
Conversation
exports.go
Outdated
@@ -73,10 +66,28 @@ func (e *Exports) Validate(vr *ValidationResults) error { | |||
for k, v := range m { | |||
var vi ValidationIssue | |||
vi.Blocking = true | |||
vi.Description = fmt.Sprintf("export subject %q already exports %q", k, v) | |||
vi.Description = fmt.Sprintf("%s export subject %q already exports %q", kind.String(), k, v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If kind has a String(), don't need it with %s.
exports_test.go
Outdated
@@ -61,7 +61,7 @@ func TestExportsValidation(t *testing.T) { | |||
exports.Add(i, i2) | |||
|
|||
vr := CreateValidationResults() | |||
exports.Validate(vr) | |||
_ = exports.Validate(vr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove assignment to nothing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some of my tools started complaining about 'unhandled errors'
exports_test.go
Outdated
@@ -92,9 +92,54 @@ func TestOverlappingExports(t *testing.T) { | |||
exports.Add(i, i2) | |||
|
|||
vr := CreateValidationResults() | |||
exports.Validate(vr) | |||
_ = exports.Validate(vr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove assignment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor nits.. Otherwise LGTM.
03c6b79
to
7d21f9c
Compare
Pull Request Test Coverage Report for Build 127
💛 - Coveralls |
exports of same kind will generate an error if their subjects overlap or are same
exports of different kind are allowed to overlap or match a different service type