1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2024-11-28 09:08:44 +02:00

Merge pull request #1039 from oauth2-proxy/fix-test-logging

Ensure errors in tests are logged to the GinkgoWriter
This commit is contained in:
Joel Speed 2021-02-11 09:48:24 +00:00 committed by GitHub
commit 465789b044
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 20 additions and 0 deletions

View File

@ -8,6 +8,8 @@
## Changes since v7.0.1
- [#1039](https://github.com/oauth2-proxy/oauth2-proxy/pull/1039) Ensure errors in tests are logged to the GinkgoWriter (@JoelSpeed)
# V7.0.1
## Release Highlights

View File

@ -10,6 +10,7 @@ import (
func TestMainSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Main Suite")

View File

@ -13,6 +13,7 @@ import (
// this functionality
func TestMiddlewareSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Middleware API")

View File

@ -10,6 +10,7 @@ import (
func TestOptionsSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Options Suite")

View File

@ -10,6 +10,7 @@ import (
func TestUtilSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Options Util Suite")

View File

@ -10,6 +10,7 @@ import (
func TestBasicSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Basic")

View File

@ -17,6 +17,7 @@ var (
func TestHeaderSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Header")

View File

@ -11,6 +11,7 @@ import (
func TestMiddlewareSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Middleware")

View File

@ -21,6 +21,7 @@ var (
func TestRequetsSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
log.SetOutput(GinkgoWriter)
RegisterFailHandler(Fail)

View File

@ -13,6 +13,7 @@ import (
// this functionality
func TestRequestUtilSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Request Utils")

View File

@ -19,6 +19,8 @@ import (
func TestSessionStore(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Cookie SessionStore")
}

View File

@ -10,6 +10,8 @@ import (
func TestPersistenceSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Persistence")
}

View File

@ -33,6 +33,7 @@ func (l *wrappedRedisLogger) Printf(_ context.Context, format string, v ...inter
func TestSessionStore(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
redisLogger := &wrappedRedisLogger{Logger: log.New(os.Stderr, "redis: ", log.LstdFlags|log.Lshortfile)}
redisLogger.SetOutput(GinkgoWriter)

View File

@ -18,6 +18,7 @@ import (
func TestSessionStore(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "SessionStore")

View File

@ -26,6 +26,7 @@ var (
func TestUpstreamSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
log.SetOutput(GinkgoWriter)
RegisterFailHandler(Fail)

View File

@ -10,6 +10,7 @@ import (
func TestValidationSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Validation Suite")

View File

@ -10,6 +10,7 @@ import (
func TestProviderSuite(t *testing.T) {
logger.SetOutput(GinkgoWriter)
logger.SetErrOutput(GinkgoWriter)
RegisterFailHandler(Fail)
RunSpecs(t, "Providers")