Skip to content

Commit

Permalink
Notifications: fix for long funning tasks
Browse files Browse the repository at this point in the history
For some reason, rake command in form `<ENV_VAR> foreman-rake ...`
started to ignore the ENV_VAR and the fix is to pass the ENV_VAR *after* the command,
i.e. - `foreman-rake ... <ENV_VAR>`.
  • Loading branch information
pnovotny committed Jan 31, 2024
1 parent 2c726d8 commit 727d43f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/foreman/api/test_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def reschedule_long_running_tasks_notification(target_sat):

assert (
target_sat.execute(
f"FOREMAN_TASKS_CHECK_LONG_RUNNING_TASKS_CRONLINE='{every_minute_cron_schedule}' "
"foreman-rake foreman_tasks:reschedule_long_running_tasks_checker"
"foreman-rake foreman_tasks:reschedule_long_running_tasks_checker "
f"FOREMAN_TASKS_CHECK_LONG_RUNNING_TASKS_CRONLINE='{every_minute_cron_schedule}'"
).status
== 0
)
Expand All @@ -94,8 +94,8 @@ def reschedule_long_running_tasks_notification(target_sat):

assert (
target_sat.execute(
f"FOREMAN_TASKS_CHECK_LONG_RUNNING_TASKS_CRONLINE='{default_cron_schedule}' "
"foreman-rake foreman_tasks:reschedule_long_running_tasks_checker"
"foreman-rake foreman_tasks:reschedule_long_running_tasks_checker "
f"FOREMAN_TASKS_CHECK_LONG_RUNNING_TASKS_CRONLINE='{default_cron_schedule}'"
).status
== 0
)
Expand Down

0 comments on commit 727d43f

Please sign in to comment.