summaryrefslogtreecommitdiffstats
path: root/integrations/integration_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'integrations/integration_test.go')
-rw-r--r--integrations/integration_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/integrations/integration_test.go b/integrations/integration_test.go
index 3c0125af6c..0d49e524d5 100644
--- a/integrations/integration_test.go
+++ b/integrations/integration_test.go
@@ -22,6 +22,7 @@ import (
"runtime"
"strings"
"testing"
+ "time"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base"
@@ -66,6 +67,27 @@ func TestMain(m *testing.M) {
mac = routes.NewMacaron()
routes.RegisterRoutes(mac)
+ // integration test settings...
+ if setting.Cfg != nil {
+ testingCfg := setting.Cfg.Section("integration-tests")
+ slowTest = testingCfg.Key("SLOW_TEST").MustDuration(slowTest)
+ slowFlush = testingCfg.Key("SLOW_FLUSH").MustDuration(slowFlush)
+ }
+
+ if os.Getenv("GITEA_SLOW_TEST_TIME") != "" {
+ duration, err := time.ParseDuration(os.Getenv("GITEA_SLOW_TEST_TIME"))
+ if err == nil {
+ slowTest = duration
+ }
+ }
+
+ if os.Getenv("GITEA_SLOW_FLUSH_TIME") != "" {
+ duration, err := time.ParseDuration(os.Getenv("GITEA_SLOW_FLUSH_TIME"))
+ if err == nil {
+ slowFlush = duration
+ }
+ }
+
var helper testfixtures.Helper
if setting.Database.UseMySQL {
helper = &testfixtures.MySQL{}