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

patch: update mock181's get, check for non-readable or non-existing parameters #194

Merged
merged 5 commits into from
Jul 18, 2024

Conversation

denopink
Copy link
Contributor

@denopink denopink commented Jul 15, 2024

During mock181's get:

  • check for any non-readable params
  • if any param is not readable, do not return any parameters that succeeded
  • add case when request param is not found
  • update wildcard case

@denopink denopink added the enhancement improvement or small functionality added to an existing feature label Jul 15, 2024
@denopink denopink requested review from schmidtw and piccione99 July 15, 2024 23:49
@denopink denopink self-assigned this Jul 15, 2024
@denopink denopink marked this pull request as draft July 15, 2024 23:55
@denopink denopink force-pushed the denopink/patch/mocktr181-rework-get branch 2 times, most recently from 1584ec2 to 8c06497 Compare July 16, 2024 00:47
failedNames = append(failedNames, mockParameter.Name)
}

if !found {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

added case when a requested parameter is not found

Copy link

codecov bot commented Jul 16, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 3 lines in your changes missing coverage. Please review.

Project coverage is 77.20%. Comparing base (ced8a1c) to head (a74afbb).

Files Patch % Lines
internal/wrphandlers/mocktr181/handler.go 85.71% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #194      +/-   ##
==========================================
+ Coverage   76.97%   77.20%   +0.23%     
==========================================
  Files          75       75              
  Lines        4529     4540      +11     
==========================================
+ Hits         3486     3505      +19     
+ Misses        842      836       -6     
+ Partials      201      199       -2     
Flag Coverage Δ
unittests 77.20% <85.71%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

During mock181's get:
- check for any non-readable params
- if any param is not readable, do not return any parameters that succeeded
- add case when request param is not found
- update wildcard case
@denopink denopink force-pushed the denopink/patch/mocktr181-rework-get branch from 8c06497 to 943336d Compare July 16, 2024 00:55

// If requested parameter is a wild card and mockParameter is not readable,
// then continue and don't count it as a failure.
if name[len(name)-1] == '.' {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

update wildcard case

@denopink denopink marked this pull request as ready for review July 16, 2024 00:58
@denopink denopink changed the title patch: update mock181's get, check for non-readable parameters patch: update mock181's get, check for non-readable or non-existing parameters Jul 16, 2024
@denopink denopink merged commit 62bbdf0 into main Jul 18, 2024
17 of 18 checks passed
@denopink denopink deleted the denopink/patch/mocktr181-rework-get branch July 18, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improvement or small functionality added to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants