summaryrefslogtreecommitdiff
path: root/internal/testhelper/testhelper.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/testhelper/testhelper.go')
-rw-r--r--internal/testhelper/testhelper.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/internal/testhelper/testhelper.go b/internal/testhelper/testhelper.go
index 933da00..65fb975 100644
--- a/internal/testhelper/testhelper.go
+++ b/internal/testhelper/testhelper.go
@@ -7,11 +7,8 @@ import (
"path"
"runtime"
"testing"
- "time"
"github.com/otiai10/copy"
- "github.com/sirupsen/logrus"
- "github.com/sirupsen/logrus/hooks/test"
"github.com/stretchr/testify/require"
)
@@ -75,25 +72,3 @@ func Setenv(key, value string) (func(), error) {
err := os.Setenv(key, value)
return func() { os.Setenv(key, oldValue) }, err
}
-
-func SetupLogger() *test.Hook {
- logger, hook := test.NewNullLogger()
- logrus.SetOutput(logger.Writer())
-
- return hook
-}
-
-// logrus fires a Goroutine to write the output log, but there's no way to
-// flush all outstanding hooks to fire. We just wait up to a second
-// for an event to appear.
-func WaitForLogEvent(hook *test.Hook) bool {
- for i := 0; i < 10; i++ {
- if entry := hook.LastEntry(); entry != nil {
- return true
- }
-
- time.Sleep(100 * time.Millisecond)
- }
-
- return false
-}