Skip to content

Commit

Permalink
refactor: Rename runner healthcheck env vars
Browse files Browse the repository at this point in the history
Related PR: n8n-io/n8n#12027
  • Loading branch information
tomi committed Dec 4, 2024
1 parent 0ea9ed4 commit 6f62c38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func PrepareRunnerEnv(cfg *config.Config) []string {
allowedEnvs := append(defaultEnvs, cfg.Runner.AllowedEnv...)

runnerEnv := allowedOnly(allowedEnvs)
runnerEnv = append(runnerEnv, "N8N_RUNNERS_SERVER_ENABLED=true")
runnerEnv = append(runnerEnv, "N8N_RUNNERS_HEALTH_CHECK_SERVER_ENABLED=true")
runnerEnv = append(runnerEnv, fmt.Sprintf("%s=%s", EnvVarAutoShutdownTimeout, cfg.AutoShutdownTimeout))

return runnerEnv
Expand Down
6 changes: 3 additions & 3 deletions internal/env/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func TestPrepareRunnerEnv(t *testing.T) {
"CUSTOM_VAR2=value2",
"LANG=en_US.UTF-8",
"N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT=15",
"N8N_RUNNERS_SERVER_ENABLED=true",
"N8N_RUNNERS_HEALTH_CHECK_SERVER_ENABLED=true",
"PATH=/usr/bin",
"TERM=xterm",
"TZ=UTC",
Expand All @@ -198,7 +198,7 @@ func TestPrepareRunnerEnv(t *testing.T) {
expected: []string{
"LANG=en_US.UTF-8",
"N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT=15",
"N8N_RUNNERS_SERVER_ENABLED=true",
"N8N_RUNNERS_HEALTH_CHECK_SERVER_ENABLED=true",
"PATH=/usr/bin",
},
},
Expand All @@ -216,7 +216,7 @@ func TestPrepareRunnerEnv(t *testing.T) {
},
expected: []string{
"N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT=30",
"N8N_RUNNERS_SERVER_ENABLED=true",
"N8N_RUNNERS_HEALTH_CHECK_SERVER_ENABLED=true",
"PATH=/usr/bin",
},
},
Expand Down

0 comments on commit 6f62c38

Please sign in to comment.