-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsonschema_suite_test.go
46 lines (39 loc) · 1.14 KB
/
jsonschema_suite_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package jsonschema_test
import (
"testing"
"go.uber.org/zap/zapcore"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
zapraw "go.uber.org/zap"
ctrl "sigs.k8s.io/controller-runtime"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
func TestEmbedX(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "EmbedX Suite")
}
var _ = BeforeSuite(func() {
encoder := zapcore.EncoderConfig{
// Keys can be anything except the empty string.
TimeKey: "T",
LevelKey: "L",
NameKey: "N",
CallerKey: "C",
MessageKey: "M",
StacktraceKey: "S",
LineEnding: zapcore.DefaultLineEnding,
EncodeLevel: zapcore.CapitalLevelEncoder,
EncodeTime: zapcore.ISO8601TimeEncoder,
EncodeDuration: zapcore.StringDurationEncoder,
EncodeCaller: zapcore.FullCallerEncoder,
}
opts := zap.Options{
Encoder: zapcore.NewConsoleEncoder(encoder),
Development: true,
StacktraceLevel: zapcore.PanicLevel,
Level: zapcore.Level(int8(-2)),
}
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts), zap.RawZapOpts(zapraw.AddCaller(), zapraw.AddCallerSkip(-2))))
}, 60)
var _ = AfterSuite(func() {
})