[PR #2995] [MERGED] Don't print SQL in unit tests #16704

Closed
opened 2025-11-02 12:16:47 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/2995
Author: @ethantkoenig
Created: 11/27/2017
Status: Merged
Merged: 11/27/2017
Merged by: @lafriks

Base: masterHead: tests/no_sql_output


📝 Commits (4)

  • 93a966e Don't print SQL in unit tests
  • 2ad8f5d Add env variable
  • 4ffdbe9 Merge branch 'master' into tests/no_sql_output
  • d04324b Merge branch 'master' into tests/no_sql_output

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 models/unit_tests.go (+4 -1)

📄 Description

Currently, all SQL commands, from all tests, are printed to stdout (or maybe stderr?) when a unit test fails. This is too much output (thousands of lines) to be helpful as the default; you have to scroll through a bunch of unrelated output just to see which test failed.

Now, output will only be printed if the environment variable $GITEA_UNIT_TESTS_VERBOSE is set to true.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/2995 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 11/27/2017 **Status:** ✅ Merged **Merged:** 11/27/2017 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `tests/no_sql_output` --- ### 📝 Commits (4) - [`93a966e`](https://github.com/go-gitea/gitea/commit/93a966e6f39ecd130a84a85fa9e8d14d72ee9016) Don't print SQL in unit tests - [`2ad8f5d`](https://github.com/go-gitea/gitea/commit/2ad8f5de269ef708991cc8fc44aa9852b28f97af) Add env variable - [`4ffdbe9`](https://github.com/go-gitea/gitea/commit/4ffdbe9d4d7b7243b74dc24fe70c900c1adb828c) Merge branch 'master' into tests/no_sql_output - [`d04324b`](https://github.com/go-gitea/gitea/commit/d04324bdf3cba70529affde5c4df1a01f63df0d6) Merge branch 'master' into tests/no_sql_output ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `models/unit_tests.go` (+4 -1) </details> ### 📄 Description Currently, all SQL commands, from all tests, are printed to stdout (or maybe stderr?) when a unit test fails. This is too much output (thousands of lines) to be helpful as the default; you have to scroll through a bunch of unrelated output just to see which test failed. Now, output will only be printed if the environment variable `$GITEA_UNIT_TESTS_VERBOSE` is set to true. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:16:47 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16704