Quieter Integration Tests (#6513)
* Rename BaseLogger to WriterLogger to help the creation of other providers * Don't export ColorBytes and ResetBytes from ColoredValues * Make integration tests only print logs if they fail * check can color before coloring * I always forget about MSSQL * Oh and use LEVEL in sqlite.ini * Make the test logger log at info - as it means you see the router * Remove empty expected changes * Make the migrations quieter too * Don't display SQL on error - it can be looked at in the file logs if necessary * Fix skip when using onGiteaRun
This commit is contained in:
@ -165,7 +165,12 @@ func initIntegrationTest() {
|
||||
routers.GlobalInit()
|
||||
}
|
||||
|
||||
func prepareTestEnv(t testing.TB) {
|
||||
func prepareTestEnv(t testing.TB, skip ...int) {
|
||||
ourSkip := 2
|
||||
if len(skip) > 0 {
|
||||
ourSkip += skip[0]
|
||||
}
|
||||
PrintCurrentTest(t, ourSkip)
|
||||
assert.NoError(t, models.LoadFixtures())
|
||||
assert.NoError(t, os.RemoveAll(setting.RepoRootPath))
|
||||
assert.NoError(t, os.RemoveAll(models.LocalCopyPath()))
|
||||
|
Reference in New Issue
Block a user