summaryrefslogtreecommitdiffstats
path: root/integrations/integration_test.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-04-07 01:25:14 +0100
committerLauris BH <lauris@nix.lv>2019-04-07 03:25:14 +0300
commit5422f23ed8174661b6e658250e4007b7fdf0d603 (patch)
tree87d975854be55c51e0a51c49cf93c33e310d30da /integrations/integration_test.go
parent7ed65a98e80a341885b8cddce971012b7fcdae4e (diff)
downloadgitea-5422f23ed8174661b6e658250e4007b7fdf0d603.tar.gz
gitea-5422f23ed8174661b6e658250e4007b7fdf0d603.zip
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
Diffstat (limited to 'integrations/integration_test.go')
-rw-r--r--integrations/integration_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/integrations/integration_test.go b/integrations/integration_test.go
index d300e4a38a..4263fa4805 100644
--- a/integrations/integration_test.go
+++ b/integrations/integration_test.go
@@ -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()))