mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Add test for master scheduler with when
This commit is contained in:
parent
6805a24d55
commit
553ff63a38
1 changed files with 6 additions and 1 deletions
|
@ -68,7 +68,8 @@ def _check_last_run(schedule, job_name, runtime=None):
|
|||
|
||||
|
||||
@pytest.mark.slow_test
|
||||
def test_eval(schedule):
|
||||
@pytest.mark.parametrize("master", [False, True])
|
||||
def test_eval(schedule, master):
|
||||
"""
|
||||
verify that scheduled job runs
|
||||
"""
|
||||
|
@ -83,6 +84,10 @@ def test_eval(schedule):
|
|||
# Add the job to the scheduler
|
||||
schedule.opts.update(job)
|
||||
|
||||
# The master does not have grains
|
||||
if master:
|
||||
schedule.opts.pop("grains", None)
|
||||
|
||||
# Evaluate 1 second before the run time
|
||||
schedule.eval(now=run_time1)
|
||||
ret = schedule.job_status(job_name)
|
||||
|
|
Loading…
Add table
Reference in a new issue