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

More unit tests for frontend domain handlers #6457

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

Shaddoll
Copy link
Member

What changed?

  • Improve coverage for frontend domain handlers
  • Move domain handlers to a separate file
  • Move request validation to requestValidator
  • Fix request validation for Register and Update Domain requests

Why?
Improve code quality

How did you test it?
unit tests

Potential risks

Release notes

Documentation Changes

@@ -49,6 +49,10 @@ type (
ValidateListOpenWorkflowExecutionsRequest(context.Context, *types.ListOpenWorkflowExecutionsRequest) error
ValidateListArchivedWorkflowExecutionsRequest(context.Context, *types.ListArchivedWorkflowExecutionsRequest) error
ValidateListClosedWorkflowExecutionsRequest(context.Context, *types.ListClosedWorkflowExecutionsRequest) error
ValidateRegisterDomainRequest(context.Context, *types.RegisterDomainRequest) error
Copy link
Member

Choose a reason for hiding this comment

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

nice!

Copy link

codecov bot commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 87.42138% with 20 lines in your changes missing coverage. Please review.

Project coverage is 78.97%. Comparing base (e170bd0) to head (20d697d).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
service/frontend/api/domain_handlers.go 77.27% 14 Missing and 6 partials ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
service/frontend/api/handler.go 72.93% <ø> (+1.73%) ⬆️
service/frontend/api/request_validator.go 100.00% <100.00%> (ø)
service/frontend/api/domain_handlers.go 77.27% <77.27%> (ø)

... and 8 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e170bd0...20d697d. Read the comment docs.

@Shaddoll Shaddoll enabled auto-merge (squash) October 31, 2024 20:19
@Shaddoll Shaddoll changed the title Improve coverage for frontend domain handlers More unit tests for frontend domain handlers Nov 1, 2024
@Shaddoll Shaddoll merged commit a7ce2f6 into cadence-workflow:master Nov 1, 2024
18 checks passed
@Shaddoll Shaddoll deleted the test2 branch November 1, 2024 17:21
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.

3 participants