code.gitea.io/gitea@v1.21.7/routers/api/v1/repo/main_test.go (about)

     1  // Copyright 2018 The Gitea Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package repo
     5  
     6  import (
     7  	"path/filepath"
     8  	"testing"
     9  
    10  	"code.gitea.io/gitea/models/unittest"
    11  	"code.gitea.io/gitea/modules/setting"
    12  	webhook_service "code.gitea.io/gitea/services/webhook"
    13  )
    14  
    15  func TestMain(m *testing.M) {
    16  	unittest.MainTest(m, &unittest.TestOptions{
    17  		GiteaRootPath: filepath.Join("..", "..", "..", ".."),
    18  		SetUp: func() error {
    19  			setting.LoadQueueSettings()
    20  			return webhook_service.Init()
    21  		},
    22  	})
    23  }