Task Attachments (#104)
This commit is contained in:
@ -18,10 +18,22 @@ package models
|
||||
|
||||
import (
|
||||
"code.vikunja.io/api/pkg/config"
|
||||
"code.vikunja.io/api/pkg/files"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
config.InitConfig()
|
||||
MainTest(m, config.ServiceRootpath.GetString())
|
||||
|
||||
// Set default config
|
||||
config.InitDefaultConfig()
|
||||
// We need to set the root path even if we're not using the config, otherwise fixtures are not loaded correctly
|
||||
config.ServiceRootpath.Set(os.Getenv("VIKUNJA_SERVICE_ROOTPATH"))
|
||||
|
||||
// Some tests use the file engine, so we'll need to initialize that
|
||||
files.InitTests()
|
||||
|
||||
SetupTests(config.ServiceRootpath.GetString())
|
||||
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
Reference in New Issue
Block a user