auth: support structured logging

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee
2018-04-27 14:07:22 -07:00
parent e83cc218fc
commit da4a982b1c
8 changed files with 454 additions and 127 deletions

View File

@ -19,6 +19,8 @@ import (
"github.com/coreos/etcd/auth/authpb"
"github.com/coreos/etcd/pkg/adt"
"go.uber.org/zap"
)
func TestRangePermission(t *testing.T) {
@ -51,7 +53,7 @@ func TestRangePermission(t *testing.T) {
readPerms.Insert(p, struct{}{})
}
result := checkKeyInterval(&unifiedRangePermissions{readPerms: readPerms}, tt.begin, tt.end, authpb.READ)
result := checkKeyInterval(zap.NewExample(), &unifiedRangePermissions{readPerms: readPerms}, tt.begin, tt.end, authpb.READ)
if result != tt.want {
t.Errorf("#%d: result=%t, want=%t", i, result, tt.want)
}