From f7e54ff3847b8f03592a43512ac9c53480ad331e Mon Sep 17 00:00:00 2001 From: Alexander Mazuruk Date: Fri, 26 Oct 2018 13:08:21 +0200 Subject: [PATCH] Move thisPackage to util_test Change-Id: I8eb2a74f1cc8958d9a7f5c056181b816b4f28dbc Signed-off-by: Alexander Mazuruk --- logger/call_context_test.go | 3 +-- logger/default_test.go | 1 - logger/entry_test.go | 1 - logger/logger_test.go | 1 - logger/utils_test.go | 2 ++ 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/logger/call_context_test.go b/logger/call_context_test.go index a7191bd..309a01d 100644 --- a/logger/call_context_test.go +++ b/logger/call_context_test.go @@ -45,8 +45,7 @@ func (c *CallContextTest) byPointer(depth int) *CallContext { var _ = Describe("CallContext", func() { const ( - thisFile = "call_context_test.go" - thisPackage = "git.tizen.org/tools/slav/logger" + thisFile = "call_context_test.go" ) var ( thisPath = P.Join(build.Default.GOPATH, "src", thisPackage) + "/" diff --git a/logger/default_test.go b/logger/default_test.go index 5b1597e..a396143 100644 --- a/logger/default_test.go +++ b/logger/default_test.go @@ -36,7 +36,6 @@ var _ = Describe("Default", func() { format = string("%s >>> %s") expectedMessage = string(testMessage + " >>> " + anotherTestMessage) thisFile = string("default_test.go") - thisPackage = string("git.tizen.org/tools/slav/logger") ) It("defaultLogger should be already initialized", func() { diff --git a/logger/entry_test.go b/logger/entry_test.go index a045c60..db7bf50 100644 --- a/logger/entry_test.go +++ b/logger/entry_test.go @@ -36,7 +36,6 @@ var _ = Describe("Entry", func() { format = string("%s >>> %s") expectedMessage = string(testMessage + " >>> " + anotherTestMessage) thisFile = string("entry_test.go") - thisPackage = string("git.tizen.org/tools/slav/logger") ) var ( ctrl *gomock.Controller diff --git a/logger/logger_test.go b/logger/logger_test.go index c1ec1b0..94d4710 100644 --- a/logger/logger_test.go +++ b/logger/logger_test.go @@ -35,7 +35,6 @@ var _ = Describe("Logger", func() { format = string("%s >>> %s") expectedMessage = string(testMessage + " >>> " + anotherTestMessage) thisFile = string("logger_test.go") - thisPackage = string("git.tizen.org/tools/slav/logger") ) var ( ctrl *gomock.Controller diff --git a/logger/utils_test.go b/logger/utils_test.go index 1e85763..0cf65c4 100644 --- a/logger/utils_test.go +++ b/logger/utils_test.go @@ -21,6 +21,8 @@ import ( "os" ) +const thisPackage = string("git.tizen.org/tools/slav/logger") + func withStderrMocked(testFunction func()) string { r, w, _ := os.Pipe() -- 2.7.4