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

[bugfix] OpenAPI Spec: fix duplicate route registration in query API #346

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

els0r
Copy link
Owner

@els0r els0r commented Sep 23, 2024

Makes sure that the /_query endpoint is not registered twice. This commit also adds a test to make sure any errors with API registration are caught during regular testing, not just the release stage.

Closes #345

@els0r els0r linked an issue Sep 23, 2024 that may be closed by this pull request
2 tasks
Copy link
Collaborator

@fako1024 fako1024 left a comment

Choose a reason for hiding this comment

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

Approved so you're not blocked, but if at all possible it would be good to get rid of the server / port instantiation in the tests...

pkg/api/globalquery/server/server_test.go Show resolved Hide resolved

func TestGenerateOpenAPISpec(t *testing.T) {
buf := &bytes.Buffer{}
s := NewDefault("test", "localhost:8146")
Copy link
Collaborator

Choose a reason for hiding this comment

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

See above.

Copy link
Owner Author

Choose a reason for hiding this comment

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

See above.

@els0r els0r merged commit 0c57e00 into main Sep 23, 2024
6 checks passed
@els0r els0r deleted the 345-fix-release-v414 branch September 23, 2024 10:43
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.

Fix release v4.1.4
2 participants