From 322a343c81e894b9b2f6908ec8b5a649cc53c3a2 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 18 Jul 2021 21:45:08 +0200 Subject: [PATCH] root: fix log level not being set to DEBUG for tests Signed-off-by: Jens Langhammer --- authentik/root/settings.py | 5 ++--- internal/gounicorn/gounicorn.go | 6 ------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/authentik/root/settings.py b/authentik/root/settings.py index ce2acca78..7602cd123 100644 --- a/authentik/root/settings.py +++ b/authentik/root/settings.py @@ -416,9 +416,8 @@ MEDIA_URL = "/media/" TEST = False TEST_RUNNER = "authentik.root.test_runner.PytestTestRunner" - -LOG_LEVEL = CONFIG.y("log_level").upper() if not TEST else "DEBUG" - +# We can't check TEST here as its set later by the test runner +LOG_LEVEL = CONFIG.y("log_level").upper() if "TF_BUILD" not in os.environ else "DEBUG" structlog.configure_once( processors=[ diff --git a/internal/gounicorn/gounicorn.go b/internal/gounicorn/gounicorn.go index 3bc98da29..e2aed980c 100644 --- a/internal/gounicorn/gounicorn.go +++ b/internal/gounicorn/gounicorn.go @@ -3,7 +3,6 @@ package gounicorn import ( "os" "os/exec" - "syscall" log "github.com/sirupsen/logrus" "goauthentik.io/internal/config" @@ -37,11 +36,6 @@ func (g *GoUnicorn) initCmd() { g.log.WithField("args", args).WithField("cmd", command).Debug("Starting gunicorn") g.p = exec.Command(command, args...) g.p.Env = os.Environ() - // Don't pass ctrl-c to child - // since we handle it ourselves - g.p.SysProcAttr = &syscall.SysProcAttr{ - Setpgid: true, - } g.p.Stdout = os.Stdout g.p.Stderr = os.Stderr }