diff options
author | Lukas Macko <lmacko@cisco.com> | 2017-09-07 12:45:41 +0200 |
---|---|---|
committer | Lukas Macko <lmacko@cisco.com> | 2017-09-07 12:45:41 +0200 |
commit | d07761baec9f09aef0b140ea46e38bd597dbdbbc (patch) | |
tree | 406a35de6a2b8d3b5373a917394988b2a8b8f5a7 /vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go | |
parent | f2cbe790a5c3c3e8cb59b592c252b2b84025bd91 (diff) |
import sirupsen with lowercase
Change-Id: I555587fc9ecc074ea1a42f0dc77c11716a1b06cb
Signed-off-by: Lukas Macko <lmacko@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.go | 39 |
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 d69455b..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)) - -} |