1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-08 10:45:04 +02:00
imgproxy/main_test.go
2021-03-15 18:06:01 +06:00

30 lines
375 B
Go

package main
import (
"os"
"testing"
"github.com/stretchr/testify/suite"
)
type MainTestSuite struct {
suite.Suite
oldConf config
}
func TestMain(m *testing.M) {
initialize()
os.Exit(m.Run())
}
func (s *MainTestSuite) SetupTest() {
s.oldConf = conf
// Reset presets
conf.Presets = make(presets)
}
func (s *MainTestSuite) TearDownTest() {
conf = s.oldConf
}