Skip to content
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

avoid panic on schema request when no schemas were given #1195

Merged
merged 1 commit into from
Jan 20, 2023

Conversation

ripienaar
Copy link
Contributor

Signed-off-by: R.I.Pienaar rip@devco.net

Signed-off-by: R.I.Pienaar <rip@devco.net>
@@ -984,6 +984,56 @@ func TestMonitoringHandlers(t *testing.T) {
}
}

func TestServiceNilSchema(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you may be able to do this test in your existing loop based tests but i couldnt figure it out :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having this as separate test is fine, those tests are pretty complicated as they are and adding new branches would make them unclear.

@coveralls
Copy link

coveralls commented Jan 20, 2023

Coverage Status

Coverage: 85.489% (-0.01%) from 85.5% when pulling 178f466 on ripienaar:nil_schema_panic into 966ad0d on nats-io:main.

Copy link
Collaborator

@piotrpio piotrpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -984,6 +984,56 @@ func TestMonitoringHandlers(t *testing.T) {
}
}

func TestServiceNilSchema(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having this as separate test is fine, those tests are pretty complicated as they are and adding new branches would make them unclear.

@piotrpio piotrpio merged commit a301969 into nats-io:main Jan 20, 2023
@ripienaar ripienaar deleted the nil_schema_panic branch January 20, 2023 13:55
@piotrpio piotrpio mentioned this pull request Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants