Skip to content

Commit 52a35e9

Browse files
authored
Fix to enable trace logging only for tests CLI (#110)
Signed-off-by: Igor Shishkin <[email protected]>
1 parent 8d0f6c2 commit 52a35e9

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cli/service/service.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ type Service interface {
3535
DeleteObject(containerName, versionID, objectKey string) func(ctx context.Context) error
3636
}
3737

38-
func init() {
39-
log.SetLevel(log.TraceLevel)
40-
}
41-
4238
type service struct {
4339
cache cache.CacheRepository
4440
cli v1proto.ManageServiceClient

cli/service/service_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ import (
77
"net/http/httptest"
88
"testing"
99

10+
log "github.com/sirupsen/logrus"
1011
"github.com/stretchr/testify/suite"
1112
ptr "github.com/teran/go-ptr"
1213

1314
cacheMock "github.com/teran/archived/cli/service/stat_cache/mock"
1415
)
1516

17+
func init() {
18+
log.SetLevel(log.TraceLevel)
19+
}
20+
1621
func (s *serviceTestSuite) TestCreateContainer() {
1722
s.cliMock.On("CreateContainer", "test-container").Return(nil).Once()
1823

0 commit comments

Comments
 (0)