2020-05-04 22:20:13 +02:00
|
|
|
package config
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2022-04-22 22:12:35 +02:00
|
|
|
"github.com/0xERR0R/blocky/log"
|
2022-03-03 11:27:27 +01:00
|
|
|
. "github.com/onsi/ginkgo/v2"
|
2020-05-04 22:20:13 +02:00
|
|
|
. "github.com/onsi/gomega"
|
2023-03-12 22:14:10 +01:00
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
logger *logrus.Entry
|
|
|
|
hook *log.MockLoggerHook
|
2020-05-04 22:20:13 +02:00
|
|
|
)
|
|
|
|
|
2023-11-19 23:51:49 +01:00
|
|
|
func init() {
|
2022-04-22 22:12:35 +02:00
|
|
|
log.Silence()
|
2023-11-19 23:51:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func TestConfig(t *testing.T) {
|
2020-05-04 22:20:13 +02:00
|
|
|
RegisterFailHandler(Fail)
|
|
|
|
RunSpecs(t, "Config Suite")
|
|
|
|
}
|
2023-03-12 22:14:10 +01:00
|
|
|
|
|
|
|
func suiteBeforeEach() {
|
|
|
|
BeforeEach(func() {
|
|
|
|
logger, hook = log.NewMockEntry()
|
|
|
|
})
|
|
|
|
}
|