Merge pull request #10 from vulcanize/squash-logs-in-tests

Discard logs created during tests
This commit is contained in:
Rob Mulholand 2019-02-13 15:02:02 -06:00 committed by GitHub
commit a5b9fb944c
15 changed files with 58 additions and 16 deletions

View File

@ -17,6 +17,8 @@
package repositories_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"testing"
. "github.com/onsi/ginkgo"
@ -27,3 +29,7 @@ func TestRepositories(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Repositories Suite")
}
var _ = BeforeSuite(func() {
logrus.SetOutput(ioutil.Discard)
})

View File

@ -17,8 +17,8 @@
package retriever_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"
. "github.com/onsi/ginkgo"
@ -31,5 +31,5 @@ func TestRetriever(t *testing.T) {
}
var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})

View File

@ -17,8 +17,8 @@
package transformer_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"
. "github.com/onsi/ginkgo"
@ -31,5 +31,5 @@ func TestTransformer(t *testing.T) {
}
var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})

View File

@ -17,8 +17,8 @@
package repository_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"
. "github.com/onsi/ginkgo"
@ -31,5 +31,5 @@ func TestRepository(t *testing.T) {
}
var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})

View File

@ -17,8 +17,8 @@
package retriever_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"
. "github.com/onsi/ginkgo"
@ -31,5 +31,5 @@ func TestRetriever(t *testing.T) {
}
var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})

View File

@ -17,8 +17,8 @@
package transformer_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"
. "github.com/onsi/ginkgo"
@ -31,5 +31,5 @@ func TestTransformer(t *testing.T) {
}
var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})

View File

@ -17,8 +17,8 @@
package poller_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"
. "github.com/onsi/ginkgo"
@ -31,5 +31,5 @@ func TestPoller(t *testing.T) {
}
var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})

View File

@ -17,8 +17,8 @@
package repository_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"
. "github.com/onsi/ginkgo"
@ -31,5 +31,5 @@ func TestRepository(t *testing.T) {
}
var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})

View File

@ -17,8 +17,8 @@
package retriever_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"
. "github.com/onsi/ginkgo"
@ -31,5 +31,5 @@ func TestRetriever(t *testing.T) {
}
var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})

View File

@ -1,6 +1,8 @@
package flop_kick_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"testing"
. "github.com/onsi/ginkgo"
@ -11,3 +13,7 @@ func TestFlopKick(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "FlopKick Suite")
}
var _ = BeforeSuite(func() {
logrus.SetOutput(ioutil.Discard)
})

View File

@ -1,6 +1,8 @@
package shared_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"testing"
. "github.com/onsi/ginkgo"
@ -11,3 +13,7 @@ func TestShared(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Shared Suite")
}
var _ = BeforeSuite(func() {
logrus.SetOutput(ioutil.Discard)
})

View File

@ -17,6 +17,8 @@
package maker_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"testing"
. "github.com/onsi/ginkgo"
@ -27,3 +29,7 @@ func TestMaker(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Maker Suite")
}
var _ = BeforeSuite(func() {
logrus.SetOutput(ioutil.Discard)
})

View File

@ -1,6 +1,8 @@
package pit_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"testing"
. "github.com/onsi/ginkgo"
@ -11,3 +13,7 @@ func TestPit(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Pit Suite")
}
var _ = BeforeSuite(func() {
logrus.SetOutput(ioutil.Discard)
})

View File

@ -1,6 +1,8 @@
package vat_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"testing"
. "github.com/onsi/ginkgo"
@ -11,3 +13,7 @@ func TestVat(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Vat Suite")
}
var _ = BeforeSuite(func() {
logrus.SetOutput(ioutil.Discard)
})

View File

@ -17,6 +17,8 @@
package shared_test
import (
"github.com/sirupsen/logrus"
"io/ioutil"
"testing"
. "github.com/onsi/ginkgo"
@ -27,3 +29,7 @@ func TestShared(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Shared Suite")
}
var _ = BeforeSuite(func() {
logrus.SetOutput(ioutil.Discard)
})