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

Improve test coverage of supervisor HTTP API #11477

Open
brandond opened this issue Dec 18, 2024 · 0 comments
Open

Improve test coverage of supervisor HTTP API #11477

brandond opened this issue Dec 18, 2024 · 0 comments
Assignees
Labels
kind/enhancement An improvement to existing functionality kind/internal

Comments

@brandond
Copy link
Member

brandond commented Dec 18, 2024

The request handlers for the supervisor HTTP API (/v1-$PRODUCT/*, /ping, /cacert) along with various helper functions are currently in pkg/server along with other internal controller and startup code. They probably don't belong here, and could be split out for improved maintainability.

While they end up being tested by e2e and integration tests, we don't have any unit test coverage for these functions.

We should:

  • Break up pkg/server/router.go into separate domains for router setup, request handlers, and auth helpers
  • Move request handlers and router setup into a separate package, move the node password auth helpers in with the rest of the node password stuff
  • Add unit tests for all the core routes

There are mocks spread around the nodepassword and etcd/s3 tests that we could probably move into a shared package under tests for reuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement An improvement to existing functionality kind/internal
Projects
Status: Peer Review
Development

No branches or pull requests

1 participant