Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #10 from vulcanize/squash-logs-in-tests
Browse files Browse the repository at this point in the history
Discard logs created during tests
  • Loading branch information
rmulhol authored Feb 13, 2019
2 parents ffb2ea8 + 24ec8e8 commit 6bba649
Show file tree
Hide file tree
Showing 15 changed files with 58 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
package repositories_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -27,3 +29,7 @@ func TestRepositories(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Repositories Suite")
}

var _ = BeforeSuite(func() {
logrus.SetOutput(ioutil.Discard)
})
4 changes: 2 additions & 2 deletions pkg/omni/full/retriever/retriever_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package retriever_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -31,5 +31,5 @@ func TestRetriever(t *testing.T) {
}

var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})
4 changes: 2 additions & 2 deletions pkg/omni/full/transformer/transformer_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package transformer_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -31,5 +31,5 @@ func TestTransformer(t *testing.T) {
}

var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})
4 changes: 2 additions & 2 deletions pkg/omni/light/repository/repository_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package repository_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -31,5 +31,5 @@ func TestRepository(t *testing.T) {
}

var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})
4 changes: 2 additions & 2 deletions pkg/omni/light/retriever/retriever_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package retriever_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -31,5 +31,5 @@ func TestRetriever(t *testing.T) {
}

var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})
4 changes: 2 additions & 2 deletions pkg/omni/light/transformer/transformer_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package transformer_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -31,5 +31,5 @@ func TestTransformer(t *testing.T) {
}

var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})
4 changes: 2 additions & 2 deletions pkg/omni/shared/poller/poller_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package poller_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -31,5 +31,5 @@ func TestPoller(t *testing.T) {
}

var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})
4 changes: 2 additions & 2 deletions pkg/omni/shared/repository/repository_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package repository_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -31,5 +31,5 @@ func TestRepository(t *testing.T) {
}

var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})
4 changes: 2 additions & 2 deletions pkg/omni/shared/retriever/retriever_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package retriever_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"log"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -31,5 +31,5 @@ func TestRetriever(t *testing.T) {
}

var _ = BeforeSuite(func() {
log.SetOutput(ioutil.Discard)
logrus.SetOutput(ioutil.Discard)
})
6 changes: 6 additions & 0 deletions pkg/transformers/flop_kick/flop_kick_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package flop_kick_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -11,3 +13,7 @@ func TestFlopKick(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "FlopKick Suite")
}

var _ = BeforeSuite(func() {
logrus.SetOutput(ioutil.Discard)
})
6 changes: 6 additions & 0 deletions pkg/transformers/shared/shared_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package shared_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -11,3 +13,7 @@ func TestShared(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Shared Suite")
}

var _ = BeforeSuite(func() {
logrus.SetOutput(ioutil.Discard)
})
6 changes: 6 additions & 0 deletions pkg/transformers/storage_diffs/maker/maker_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
package maker_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -27,3 +29,7 @@ func TestMaker(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Maker Suite")
}

var _ = BeforeSuite(func() {
logrus.SetOutput(ioutil.Discard)
})
6 changes: 6 additions & 0 deletions pkg/transformers/storage_diffs/maker/pit/pit_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package pit_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -11,3 +13,7 @@ func TestPit(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Pit Suite")
}

var _ = BeforeSuite(func() {
logrus.SetOutput(ioutil.Discard)
})
6 changes: 6 additions & 0 deletions pkg/transformers/storage_diffs/maker/vat/vat_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package vat_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -11,3 +13,7 @@ func TestVat(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Vat Suite")
}

var _ = BeforeSuite(func() {
logrus.SetOutput(ioutil.Discard)
})
6 changes: 6 additions & 0 deletions pkg/transformers/storage_diffs/shared/shared_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
package shared_test

import (
"github.com/sirupsen/logrus"
"io/ioutil"
"testing"

. "github.com/onsi/ginkgo"
Expand All @@ -27,3 +29,7 @@ func TestShared(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Shared Suite")
}

var _ = BeforeSuite(func() {
logrus.SetOutput(ioutil.Discard)
})

0 comments on commit 6bba649

Please sign in to comment.