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

tests: remove redundant comparison in repo dump/restore #18660

Merged
merged 2 commits into from
Feb 10, 2022

Conversation

singuliere
Copy link
Contributor

@singuliere singuliere commented Feb 7, 2022

It is a leftover forgotten in #18621

This code block was replaced by these tests. But it was also incorrectly copy/pasted before them, duplicating the verification.

Duplicating a verification is not, in itself, a bad thing. But the verification is also done in a different, less flexible, way that is more likely to fail in the future, when new fields are added. It would create additional maintenance work and it would be a waste of effort because the tests it provides are now redundant.

It is a leftover forgotten in go-gitea#18621

Signed-off-by: singuliere <[email protected]>
@singuliere singuliere added this to the 1.17.0 milestone Feb 7, 2022
@zeripath
Copy link
Contributor

zeripath commented Feb 7, 2022

Please could you explain what this was doing and why it is no longer needed.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 7, 2022
@singuliere
Copy link
Contributor Author

singuliere commented Feb 8, 2022

Please could you explain what this was doing and why it is no longer needed.

The description of the pr was updated with links and a detailed explanation.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 9, 2022
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 10, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #18660 (d576e32) into main (4d93984) will decrease coverage by 0.19%.
The diff coverage is 7.24%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #18660      +/-   ##
==========================================
- Coverage   46.64%   46.45%   -0.20%     
==========================================
  Files         846      851       +5     
  Lines      121331   121925     +594     
==========================================
+ Hits        56595    56637      +42     
- Misses      57859    58411     +552     
  Partials     6877     6877              
Impacted Files Coverage Δ
modules/git/diff.go 75.93% <0.00%> (-4.07%) ⬇️
routers/api/v1/repo/migrate.go 50.71% <0.00%> (ø)
routers/api/v1/repo/patch.go 0.00% <0.00%> (ø)
routers/web/repo/cherry_pick.go 0.00% <0.00%> (ø)
routers/web/repo/patch.go 0.00% <0.00%> (ø)
services/forms/repo_form.go 41.29% <0.00%> (-0.82%) ⬇️
services/repository/files/cherry_pick.go 0.00% <0.00%> (ø)
services/repository/files/patch.go 0.00% <0.00%> (ø)
modules/setting/setting.go 45.77% <20.00%> (-0.34%) ⬇️
modules/queue/workerpool.go 55.90% <38.70%> (+0.03%) ⬆️
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e034d3a...d576e32. Read the comment docs.

@lunny lunny merged commit bc8e19e into go-gitea:main Feb 10, 2022
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 10, 2022
* giteaofficial/main:
  Fix issue with docker-rootless shimming script (go-gitea#18690)
  tests: remove redundant comparison in repo dump/restore (go-gitea#18660)
  [skip ci] Updated translations via Crowdin
  Disable unnecessary OpenID/OAuth2 elements (go-gitea#18491)
  Add apply-patch, basic revert and cherry-pick functionality (go-gitea#17902)
  C preprocessor colors improvement (go-gitea#18671)
  Update object repo with the migrated repository (go-gitea#18684)
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
It is a leftover forgotten in go-gitea#18621

Signed-off-by: singuliere <[email protected]>

Co-authored-by: Lunny Xiao <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants