[PR #1697] [MERGED] Don't recreate database in integration tests #16004

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

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/1697
Author: @ethantkoenig
Created: 5/9/2017
Status: Merged
Merged: 5/11/2017
Merged by: @appleboy

Base: masterHead: etk/fixtures


📝 Commits (1)

  • 0f9cba1 Don't recreate database in integration tests

📊 Changes

2 files changed (+2 additions, -6 deletions)

View changed files

📝 integrations/integration_test.go (+1 -6)
models/fixtures/protected_branch.yml (+1 -0)

📄 Description

There was previously an issue with the test database not being cleared between runs of the integration suite; this problem was fixed in https://github.com/go-gitea/gitea/pull/1693 by deleting and re-creating the test database each time tests are run

This fixes the problem, but is really slow. I realized that the reason the test database wasn't being cleared was due to a missing test fixture file. This PR adds the missing fixture, and removing the now-unnecessary deletion and recreation of test databases.


🔄 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/1697 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 5/9/2017 **Status:** ✅ Merged **Merged:** 5/11/2017 **Merged by:** [@appleboy](https://github.com/appleboy) **Base:** `master` ← **Head:** `etk/fixtures` --- ### 📝 Commits (1) - [`0f9cba1`](https://github.com/go-gitea/gitea/commit/0f9cba1f5318a2d41b6f168bf465c190d8575a58) Don't recreate database in integration tests ### 📊 Changes **2 files changed** (+2 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `integrations/integration_test.go` (+1 -6) ➕ `models/fixtures/protected_branch.yml` (+1 -0) </details> ### 📄 Description There was previously an issue with the test database not being cleared between runs of the integration suite; this problem was fixed in https://github.com/go-gitea/gitea/pull/1693 by deleting and re-creating the test database each time tests are run This fixes the problem, but is really slow. I realized that the reason the test database wasn't being cleared was due to a missing test fixture file. This PR adds the missing fixture, and removing the now-unnecessary deletion and recreation of test databases. --- <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:00:03 -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#16004