Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Test renderReadmeFile #23185

Merged
merged 5 commits into from
Mar 9, 2023
Merged

Test renderReadmeFile #23185

merged 5 commits into from
Mar 9, 2023

Conversation

kousu
Copy link
Contributor

@kousu kousu commented Feb 28, 2023

Add test coverage to the important features of routers.web.repo.renderReadmeFile; namely that:

  • it can handle looking in docs/, .gitea/, and .github/
  • it can handle choosing between multiple competing READMEs
  • it prefers the localized README to the markdown README to the plaintext README
  • it can handle broken symlinks when processing all the options
  • it uses the name of the symlink, not the name of the target of the symlink

@kousu kousu force-pushed the test-findReadmeFile branch from 9659e1a to 6431879 Compare February 28, 2023 04:56
@codecov-commenter
Copy link

Codecov Report

Merging #23185 (6431879) into main (33e556e) will increase coverage by 0.04%.
The diff coverage is 49.51%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main   #23185      +/-   ##
==========================================
+ Coverage   47.44%   47.49%   +0.04%     
==========================================
  Files        1140     1140              
  Lines      150804   150985     +181     
==========================================
+ Hits        71549    71708     +159     
- Misses      70788    70794       +6     
- Partials     8467     8483      +16     
Impacted Files Coverage Δ
models/actions/run.go 1.73% <0.00%> (+0.02%) ⬆️
models/actions/run_list.go 0.00% <0.00%> (ø)
models/actions/status.go 22.85% <0.00%> (-1.39%) ⬇️
models/auth/oauth2.go 60.52% <ø> (ø)
models/auth/twofactor.go 19.73% <ø> (ø)
models/db/engine.go 44.80% <ø> (ø)
models/issues/label.go 55.95% <0.00%> (ø)
models/unittest/testdb.go 12.92% <0.00%> (ø)
modules/auth/password/hash/pbkdf2.go 69.69% <ø> (ø)
modules/avatar/hash.go 100.00% <ø> (ø)
... and 68 more

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

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 28, 2023
@yardenshoham yardenshoham added this to the 1.20.0 milestone Feb 28, 2023
@kousu kousu changed the title Test findReadmefileInEntries Test renderReadmeFile Mar 2, 2023
@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 Mar 5, 2023
@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 Mar 8, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 9, 2023
@lunny lunny merged commit 52e2416 into go-gitea:main Mar 9, 2023
@lunny lunny removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 9, 2023
@kousu
Copy link
Contributor Author

kousu commented Mar 9, 2023

Thank you :)

zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 9, 2023
* giteaofficial/main:
  Test renderReadmeFile (go-gitea#23185)
  [skip ci] Updated translations via Crowdin
  Set `X-Gitea-Debug` header once (go-gitea#23361)
  Improve cache context (go-gitea#23330)
  add user visibility in dashboard navbar (go-gitea#22747)
  Fix panic when getting notes by ref (go-gitea#23372)
  Use CleanPath instead of path.Clean (go-gitea#23371)
  Reduce duplicate and useless code in options (go-gitea#23369)
  Clean Path in Options (go-gitea#23006)
  Do not recognize text files as audio (go-gitea#23355)
  Fix incorrect display for comment context menu  (go-gitea#23343)

# Conflicts:
#	templates/repo/issue/view_content/context_menu.tmpl
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
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.

6 participants