quintodrome/engine/engine_suite_test.go

36 lines
690 B
Go
Raw Normal View History

2020-01-15 13:49:09 -09:00
package engine
import (
2020-04-05 16:31:05 -08:00
"io/ioutil"
"os"
2020-01-15 13:49:09 -09:00
"testing"
2020-01-23 15:44:08 -09:00
"github.com/deluan/navidrome/log"
"github.com/deluan/navidrome/tests"
2020-04-05 16:31:05 -08:00
"github.com/djherbis/fscache"
2020-01-15 13:49:09 -09:00
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
2020-01-15 17:52:50 -09:00
func TestEngine(t *testing.T) {
tests.Init(t, false)
2020-01-15 13:49:09 -09:00
log.SetLevel(log.LevelCritical)
RegisterFailHandler(Fail)
2020-01-15 17:52:50 -09:00
RunSpecs(t, "Engine Suite")
2020-01-15 13:49:09 -09:00
}
2020-04-05 16:31:05 -08:00
var testCache fscache.Cache
var testCacheDir string
var _ = Describe("Engine Suite Setup", func() {
BeforeSuite(func() {
testCacheDir, _ = ioutil.TempDir("", "test_cache")
fs, _ := fscache.NewFs(testCacheDir, 0755)
testCache, _ = fscache.NewCache(fs, nil)
})
AfterSuite(func() {
os.RemoveAll(testCacheDir)
})
})