mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Run unused test
This commit is contained in:
		| @@ -7,8 +7,16 @@ import ( | |||||||
| 	"testing" | 	"testing" | ||||||
|  |  | ||||||
| 	"code.gitea.io/gitea/modules/setting" | 	"code.gitea.io/gitea/modules/setting" | ||||||
|  |  | ||||||
|  | 	"github.com/stretchr/testify/assert" | ||||||
| ) | ) | ||||||
|  |  | ||||||
|  | // TestFixturesAreConsistent assert that test fixtures are consistent | ||||||
|  | func TestFixturesAreConsistent(t *testing.T) { | ||||||
|  | 	assert.NoError(t, PrepareTestDatabase()) | ||||||
|  | 	CheckConsistencyForAll(t) | ||||||
|  | } | ||||||
|  |  | ||||||
| func TestMain(m *testing.M) { | func TestMain(m *testing.M) { | ||||||
| 	if err := CreateTestEngine(); err != nil { | 	if err := CreateTestEngine(); err != nil { | ||||||
| 		fmt.Printf("Error creating test engine: %v\n", err) | 		fmt.Printf("Error creating test engine: %v\n", err) | ||||||
|   | |||||||
| @@ -32,12 +32,6 @@ func CreateTestEngine() error { | |||||||
| 	return InitFixtures(&testfixtures.SQLite{}, "fixtures/") | 	return InitFixtures(&testfixtures.SQLite{}, "fixtures/") | ||||||
| } | } | ||||||
|  |  | ||||||
| // TestFixturesAreConsistent assert that test fixtures are consistent |  | ||||||
| func TestFixturesAreConsistent(t *testing.T) { |  | ||||||
| 	assert.NoError(t, PrepareTestDatabase()) |  | ||||||
| 	CheckConsistencyForAll(t) |  | ||||||
| } |  | ||||||
|  |  | ||||||
| // PrepareTestDatabase load test fixtures into test database | // PrepareTestDatabase load test fixtures into test database | ||||||
| func PrepareTestDatabase() error { | func PrepareTestDatabase() error { | ||||||
| 	return LoadFixtures() | 	return LoadFixtures() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user