-
Notifications
You must be signed in to change notification settings - Fork 83
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mikehelmick The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
@@ -77,8 +85,8 @@ func (s *Subject) SymptomInterval() uint32 { | |||
|
|||
func ParseSubject(sub string) (*Subject, error) { | |||
parts := strings.Split(sub, ".") | |||
if length := len(parts); length < 1 || length > 2 { | |||
return nil, fmt.Errorf("subject must contain 2 parts, got: %v", length) | |||
if length := len(parts); length < 2 || length > 3 { |
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.
Won't think break existing JWT tokens that have the old subject?
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.
the old if statement was wrong - it should have always been 2 parts before.
Why I didn't write length != 2
the first time, we'll never know.
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.
Not that I doubt your code, but this feels like a test.
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.
^ what Jeremy said
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.
funny enough - the 2 segment subject was the only thing under test before.
test coverage has been boosted to cover all scenarios.
/lgtm still hold, pending clinicians. |
/unhold |
Fixes #882
Proposed Changes
Release Note