aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2017-11-28 16:28:48 +0100
committerOndrej Fabry <ofabry@cisco.com>2017-11-28 16:29:42 +0100
commitac6019137d5b10d02c7acac4f63fa22091b9933d (patch)
tree6b7cc4ecd56fce967bf5665292503459582a58ac /vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go
parent3f1edad4e6ba0a7876750aea55507fae14d8badf (diff)
Fix imports for github.com/sirupsen/logrus
Change-Id: I84f2e45e5ff188a2a7a80cf69f607b44486c1754 Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go')
-rw-r--r--vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go39
1 files changed, 0 insertions, 39 deletions
diff --git a/vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go b/vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go
deleted file mode 100644
index 3f55cfe..0000000
--- a/vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package test
-
-import (
- "testing"
-
- "github.com/sirupsen/logrus"
- "github.com/stretchr/testify/assert"
-)
-
-func TestAllHooks(t *testing.T) {
-
- assert := assert.New(t)
-
- logger, hook := NewNullLogger()
- assert.Nil(hook.LastEntry())
- assert.Equal(0, len(hook.Entries))
-
- logger.Error("Hello error")
- assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level)
- assert.Equal("Hello error", hook.LastEntry().Message)
- assert.Equal(1, len(hook.Entries))
-
- logger.Warn("Hello warning")
- assert.Equal(logrus.WarnLevel, hook.LastEntry().Level)
- assert.Equal("Hello warning", hook.LastEntry().Message)
- assert.Equal(2, len(hook.Entries))
-
- hook.Reset()
- assert.Nil(hook.LastEntry())
- assert.Equal(0, len(hook.Entries))
-
- hook = NewGlobal()
-
- logrus.Error("Hello error")
- assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level)
- assert.Equal("Hello error", hook.LastEntry().Message)
- assert.Equal(1, len(hook.Entries))
-
-}