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

Fix scopes for server component firmwares #141

Conversation

diogomatsubara
Copy link
Contributor

The endpoint /server-component-firmwares is incorrectly requesting server scopes instead of server-component-firmwares. This PR corrects the scopes and add an additional scopedRealClientTests test function to help test scoped requests.

scopedRealClientTests allows tests to be written with a scoped auth
token so requests to endpoints can check if the correct scope is passed.
Required auth scopes for server-component-firmwares were wrongly set to
server only instead of the actual object it refers to.
@diogomatsubara diogomatsubara requested a review from a team as a code owner September 9, 2022 13:42
@codecov-commenter
Copy link

Codecov Report

Merging #141 (7e8e526) into main (2d845d2) will increase coverage by 0.15%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #141      +/-   ##
==========================================
+ Coverage   74.00%   74.15%   +0.15%     
==========================================
  Files          32       32              
  Lines        2577     2577              
==========================================
+ Hits         1907     1911       +4     
+ Misses        494      491       -3     
+ Partials      176      175       -1     
Flag Coverage Δ
unittests 74.15% <100.00%> (+0.15%) ⬆️

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

Impacted Files Coverage Δ
pkg/api/v1/router.go 82.60% <100.00%> (ø)
pkg/api/v1/router_firmware.go 57.40% <0.00%> (+3.70%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@diogomatsubara diogomatsubara merged commit 3f60a20 into metal-toolbox:main Sep 12, 2022
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