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: s/GITEA_UNIT_TESTS_VERBOSE/GITEA_UNIT_TESTS_LOG_SQL/ #18142

Merged
merged 3 commits into from
Jan 1, 2022

Conversation

singuliere
Copy link
Contributor

The GITEA_UNIT_TESTS_VERBOSE variable is an undocumented variable
introduced in 2017 (see 1028ef2)
whose sole purpose has been to log SQL statements when running unit
tests.

It is renamed for clarity and a warning is displayed for backward
compatibility for people and scripts that know about it.

The documentation is updated to reflect this change.

Copy link
Contributor

@zeripath zeripath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think renaming this undocumented variable is reasonable.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Dec 31, 2021
@wxiaoguang
Copy link
Contributor

After renaming, I think we can safely drop the GITEA_UNIT_TESTS_VERBOSE together in this PR: it was undocumented, and only for developers, it's safe to be removed. IMO no one will be hurt or unhappy :D

@zeripath
Copy link
Contributor

Agreed either way

The GITEA_UNIT_TESTS_VERBOSE variable is an undocumented variable
introduced in 2017 (see 1028ef2)
whose sole purpose has been to log SQL statements when running unit
tests. It is renamed for clarity.

The documentation is updated to reflect this change.

Signed-off-by: singuliere <singuliere@autistici.org>
@singuliere
Copy link
Contributor Author

After renaming, I think we can safely drop the GITEA_UNIT_TESTS_VERBOSE together in this PR: it was undocumented, and only for developers, it's safe to be removed. IMO no one will be hurt or unhappy :D

I dropped the backward compatibility change as requested.

@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 Dec 31, 2021
models/unittest/testdb.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@c99b8ef). Click here to learn what that means.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #18142   +/-   ##
=======================================
  Coverage        ?   44.91%           
=======================================
  Files           ?      825           
  Lines           ?    91576           
  Branches        ?        0           
=======================================
  Hits            ?    41135           
  Misses          ?    43862           
  Partials        ?     6579           
Impacted Files Coverage Δ
models/unittest/testdb.go 18.18% <0.00%> (ø)

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 c99b8ef...176e968. Read the comment docs.

@6543 6543 merged commit 1a4e2bf into go-gitea:main Jan 1, 2022
@wxiaoguang wxiaoguang added type/testing skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Jan 1, 2022
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jan 1, 2022
* giteaoffical/main:
  tests: s/GITEA_UNIT_TESTS_VERBOSE/GITEA_UNIT_TESTS_LOG_SQL/ (go-gitea#18142)
  services/repository: fix ListUnadoptedRepositories incorrect total count (go-gitea#17865)
  Improve document for developers: Windows CGO, unit test option (go-gitea#18140)
  Reset the conflicted files list in testpatch (go-gitea#18139)
  Use correct translation key (go-gitea#18135)
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
…#18142)

The GITEA_UNIT_TESTS_VERBOSE variable is an undocumented variable
introduced in 2017 (see 1028ef2)
whose sole purpose has been to log SQL statements when running unit
tests.

It is renamed for clarity and a warning is displayed for backward
compatibility for people and scripts that know about it.

The documentation is updated to reflect this change.
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
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. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants