Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Add user profile tests, refactor user API methods #3030

Merged
merged 5 commits into from
Apr 3, 2023

Conversation

S7evinK
Copy link
Contributor

@S7evinK S7evinK commented Mar 27, 2023

This adds tests for /profile.
Also, as a first change in this regard, refactors the methods defined on the UserInternalAPI to not use structs as the request/response parameters.

@S7evinK S7evinK added tests Issues related to tests. Missing/Flakey/etc T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. labels Mar 27, 2023
@S7evinK S7evinK requested a review from a team as a code owner March 27, 2023 13:50
@codecov
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

Patch coverage: 62.65% and project coverage change: +0.10 🎉

Comparison is base (2854ffe) 65.95% compared to head (7853548) 66.05%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3030      +/-   ##
==========================================
+ Coverage   65.95%   66.05%   +0.10%     
==========================================
  Files         495      495              
  Lines       53642    53580      -62     
==========================================
+ Hits        35377    35394      +17     
+ Misses      14625    14556      -69     
+ Partials     3640     3630      -10     
Flag Coverage Δ
unittests 44.76% <62.65%> (+0.21%) ⬆️

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

Impacted Files Coverage Δ
clientapi/routing/server_notices.go 65.86% <0.00%> (-4.66%) ⬇️
clientapi/threepid/invites.go 6.56% <0.00%> (+0.19%) ⬆️
federationapi/routing/threepid.go 0.00% <0.00%> (ø)
internal/eventutil/types.go 62.50% <ø> (ø)
userapi/api/api.go 70.90% <ø> (ø)
federationapi/routing/profile.go 61.22% <50.00%> (-6.09%) ⬇️
appservice/api/query.go 57.89% <60.00%> (+0.75%) ⬆️
userapi/internal/user_api.go 61.77% <81.81%> (-0.46%) ⬇️
clientapi/routing/profile.go 54.09% <84.61%> (+18.46%) ⬆️
clientapi/routing/joinroom.go 88.40% <100.00%> (+1.26%) ⬆️
... and 2 more

... and 22 files with indirect coverage changes

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

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@S7evinK S7evinK merged commit c2db38d into main Apr 3, 2023
@S7evinK S7evinK deleted the s7evink/csapiprofiletests branch April 3, 2023 18:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. tests Issues related to tests. Missing/Flakey/etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants