From 235363c2bb2f64a735be3b9d18296999f20b6d15 Mon Sep 17 00:00:00 2001 From: Semyon Krestyaninov <ensiouel@gmail.com> Date: Wed, 7 Feb 2024 09:15:50 +0300 Subject: [PATCH] refactor --- pkg/log/zap/core_test.go | 3 +-- pkg/log/zap/zap_test.go | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pkg/log/zap/core_test.go b/pkg/log/zap/core_test.go index 07be4e3c..180f622a 100644 --- a/pkg/log/zap/core_test.go +++ b/pkg/log/zap/core_test.go @@ -1,7 +1,6 @@ package zap import ( - "context" "testing" "git.perx.ru/perxis/perxis-go/pkg/log" @@ -34,7 +33,7 @@ func TestCore_getEntry(t *testing.T) { Component("Items.Service"), Event("Items.Create"), Object("/spaces/WPNN/envs/9VGP/cols/GxNv/items/W0fl"), - CallerFromContext(ContextWithCaller(context.Background(), "/users/PHVz")), + Caller("/users/PHVz"), Attr("any"), Tags("tag1", "tag2", "tag3"), }, diff --git a/pkg/log/zap/zap_test.go b/pkg/log/zap/zap_test.go index 3b9422fc..bcea51b9 100644 --- a/pkg/log/zap/zap_test.go +++ b/pkg/log/zap/zap_test.go @@ -1,7 +1,6 @@ package zap import ( - "context" "reflect" "slices" "testing" @@ -61,7 +60,7 @@ func TestExample(t *testing.T) { Component("Items.Service"), Event("Items.Create"), Object("/spaces/WPNN/envs/9VGP/cols/GxNv/items/W0fl"), - CallerFromContext(ContextWithCaller(context.Background(), "/users/PHVz")), + Caller("/users/PHVz"), Attr("any"), Tags("tag1", "tag2", "tag3"), ) @@ -70,7 +69,7 @@ func TestExample(t *testing.T) { Component("Items.Service"), Event("Items.Update"), Object("/spaces/WPNN/envs/9VGP/cols/GxNv/items/W0fl/revs/cmV2cw"), - CallerFromContext(ContextWithCaller(context.Background(), "/users/PHVz")), + Caller("/users/PHVz"), ) err := ws.Stop() -- GitLab