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

Adding validation for request input and added more UTs. #12

Merged
merged 4 commits into from
Jan 23, 2024

Conversation

priteshbandi
Copy link
Contributor

@priteshbandi priteshbandi commented Jan 19, 2024

Change Log:

  1. Added validate() Method and corresponding UTs for all the requests: This method sanity checks the input.
  2. Added UTs for error.go module. Also made some methods generic in error.go.
  3. Increased codecov coverage from 70% to 80%
  4. Moved plugin.go from cli/internal/mock/plugin.gointernal/mock/plugin.go to keep all the mocks in one place.

Signed-off-by: Pritesh Bandi <[email protected]>
@priteshbandi priteshbandi force-pushed the main branch 2 times, most recently from ae015c3 to fb1c58a Compare January 19, 2024 16:31
@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (43178dd) 70.91% compared to head (703fdcc) 88.60%.

Files Patch % Lines
cli/cli.go 25.00% 5 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #12       +/-   ##
===========================================
+ Coverage   70.91%   88.60%   +17.68%     
===========================================
  Files           7        7               
  Lines         196      272       +76     
===========================================
+ Hits          139      241      +102     
+ Misses         54       26       -28     
- Partials        3        5        +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@priteshbandi priteshbandi force-pushed the main branch 4 times, most recently from 735b149 to 75ce3e0 Compare January 19, 2024 17:42
@priteshbandi priteshbandi changed the title Adding validation for request input. Adding validation for request input and added more UTs. Jan 19, 2024
Signed-off-by: Pritesh Bandi <[email protected]>
cli/cli.go Show resolved Hide resolved
cli/cli.go Outdated Show resolved Hide resolved
plugin/errors.go Show resolved Hide resolved
Co-authored-by: Patrick Zheng <[email protected]>
Signed-off-by: Pritesh Bandi <[email protected]>
Copy link
Contributor

@JeyJeyGao JeyJeyGao left a comment

Choose a reason for hiding this comment

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

LGTM, Pending on @Two-Hearts 's comments.

Copy link
Contributor

@JeyJeyGao JeyJeyGao left a comment

Choose a reason for hiding this comment

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

Pending on @Two-Hearts 's comments.

Signed-off-by: Pritesh Bandi <[email protected]>
Copy link
Contributor

@Two-Hearts Two-Hearts left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@JeyJeyGao JeyJeyGao left a comment

Choose a reason for hiding this comment

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

LGTM

@priteshbandi priteshbandi merged commit 4df400e into notaryproject:main Jan 23, 2024
7 checks passed
@priteshbandi priteshbandi mentioned this pull request Jan 29, 2024
6 tasks
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.

4 participants