Skip to content

test: refact tests for authenticators#275

Merged
youyuanwu merged 2 commits intogo-openapi:masterfrom
fredbi:chore/linting-phase3
Dec 9, 2023
Merged

test: refact tests for authenticators#275
youyuanwu merged 2 commits intogo-openapi:masterfrom
fredbi:chore/linting-phase3

Conversation

@fredbi
Copy link
Member

@fredbi fredbi commented Dec 8, 2023

No description provided.

This phase applies trivial relinting fixes, to keep the amount of
changes reviewable.

Non-trivial fixes are deferred to a follow-up PR.

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
* addressed code duplication in tests
* used sub tests to improve readability
* covered a few additional edged cases (passing unexpected types, empty
  realm)

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@codecov
Copy link

codecov bot commented Dec 8, 2023

Codecov Report

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

Comparison is base (1af6e90) 80.41% compared to head (4bad8c4) 80.82%.

Files Patch % Lines
middleware/context.go 60.00% 2 Missing ⚠️
client/request.go 75.00% 1 Missing ⚠️
client/runtime.go 90.00% 1 Missing ⚠️
middleware/request.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #275      +/-   ##
==========================================
+ Coverage   80.41%   80.82%   +0.41%     
==========================================
  Files          44       44              
  Lines        3359     3364       +5     
==========================================
+ Hits         2701     2719      +18     
+ Misses        544      535       -9     
+ Partials      114      110       -4     
Flag Coverage Δ
oldstable 80.82% <92.42%> (+0.41%) ⬆️
stable 80.82% <92.42%> (+0.41%) ⬆️

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.

@fredbi
Copy link
Member Author

fredbi commented Dec 8, 2023

Built on top of #274

@fredbi
Copy link
Member Author

fredbi commented Dec 8, 2023

@reviewers: please check the 2nd commit - the first commit comes from #274

@fredbi fredbi requested review from casualjim and youyuanwu December 8, 2023 18:33
@youyuanwu youyuanwu merged commit 7c81d43 into go-openapi:master Dec 9, 2023
@fredbi fredbi deleted the chore/linting-phase3 branch December 10, 2023 09:37
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.

2 participants