[PR #853] [MERGED] Consistency checks for unit tests #15612

Closed
opened 2025-11-02 11:50:37 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/853
Author: @ethantkoenig
Created: 2/6/2017
Status: Merged
Merged: 2/7/2017
Merged by: @lunny

Base: masterHead: consistency


📝 Commits (1)

  • ea5a94a Consistency checks for unit tests

📊 Changes

6 files changed (+182 additions, -12 deletions)

View changed files

models/consistency_test.go (+149 -0)
📝 models/models.go (+1 -0)
📝 models/notification_test.go (+1 -0)
📝 models/org_test.go (+16 -0)
📝 models/pull_test.go (+8 -11)
📝 models/setup_for_test.go (+7 -1)

📄 Description

Consistency checks include:

  • num_XYZ columns have correct counts
  • the issue and pull_request tables are in sync

I intentionally decided not to check for the referential integrity of "foreign keys", because that would ideally be enforced by foreign key constraints in the database.


🔄 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/853 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 2/6/2017 **Status:** ✅ Merged **Merged:** 2/7/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `consistency` --- ### 📝 Commits (1) - [`ea5a94a`](https://github.com/go-gitea/gitea/commit/ea5a94a0c2bd0171ffd2760b5862173fe3eae079) Consistency checks for unit tests ### 📊 Changes **6 files changed** (+182 additions, -12 deletions) <details> <summary>View changed files</summary> ➕ `models/consistency_test.go` (+149 -0) 📝 `models/models.go` (+1 -0) 📝 `models/notification_test.go` (+1 -0) 📝 `models/org_test.go` (+16 -0) 📝 `models/pull_test.go` (+8 -11) 📝 `models/setup_for_test.go` (+7 -1) </details> ### 📄 Description Consistency checks include: - `num_XYZ` columns have correct counts - the `issue` and `pull_request` tables are in sync I intentionally decided not to check for the referential integrity of "foreign keys", because that would ideally be enforced by foreign key constraints in the database. --- <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 11:50:37 -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#15612