Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov committed Dec 9, 2024
1 parent 3e385e1 commit 67c4321
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/env/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ func TestPrepareRunnerEnv(t *testing.T) {
name: "includes default and allowed env vars",
config: &config.Config{
AutoShutdownTimeout: "15",
TaskTimeout: "60",
Runner: &config.RunnerConfig{
AllowedEnv: []string{"CUSTOM_VAR1", "CUSTOM_VAR2"},
},
Expand All @@ -177,6 +178,7 @@ func TestPrepareRunnerEnv(t *testing.T) {
"LANG=en_US.UTF-8",
"N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT=15",
"N8N_RUNNERS_HEALTH_CHECK_SERVER_ENABLED=true",
"N8N_RUNNERS_TASK_TIMEOUT=60",
"PATH=/usr/bin",
"TERM=xterm",
"TZ=UTC",
Expand All @@ -186,6 +188,7 @@ func TestPrepareRunnerEnv(t *testing.T) {
name: "handles empty allowed env list",
config: &config.Config{
AutoShutdownTimeout: "15",
TaskTimeout: "60",
Runner: &config.RunnerConfig{
AllowedEnv: []string{},
},
Expand All @@ -199,13 +202,15 @@ func TestPrepareRunnerEnv(t *testing.T) {
"LANG=en_US.UTF-8",
"N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT=15",
"N8N_RUNNERS_HEALTH_CHECK_SERVER_ENABLED=true",
"N8N_RUNNERS_TASK_TIMEOUT=60",
"PATH=/usr/bin",
},
},
{
name: "handles custom auto-shutdown timeout",
config: &config.Config{
AutoShutdownTimeout: "30",
TaskTimeout: "60",
Runner: &config.RunnerConfig{
AllowedEnv: []string{},
},
Expand All @@ -217,6 +222,7 @@ func TestPrepareRunnerEnv(t *testing.T) {
expected: []string{
"N8N_RUNNERS_AUTO_SHUTDOWN_TIMEOUT=30",
"N8N_RUNNERS_HEALTH_CHECK_SERVER_ENABLED=true",
"N8N_RUNNERS_TASK_TIMEOUT=60",
"PATH=/usr/bin",
},
},
Expand Down

0 comments on commit 67c4321

Please sign in to comment.