mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Don't print SQL in unit tests (#2995)
* Add GITEA_UNIT_TESTS_VERBOSE environment variable to enable printing SQL
This commit is contained in:
		@@ -32,7 +32,10 @@ func CreateTestEngine(fixturesDir string) error {
 | 
			
		||||
	if err = x.StoreEngine("InnoDB").Sync2(tables...); err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	x.ShowSQL(true)
 | 
			
		||||
	switch os.Getenv("GITEA_UNIT_TESTS_VERBOSE") {
 | 
			
		||||
	case "true", "1":
 | 
			
		||||
		x.ShowSQL(true)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return InitFixtures(&testfixtures.SQLite{}, fixturesDir)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user