root: fix log level not being set to DEBUG for tests

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-07-18 21:45:08 +02:00
parent 6ddd6bfa72
commit 322a343c81
2 changed files with 2 additions and 9 deletions

View file

@ -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=[

View file

@ -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
}