"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/integration/scheduler/test_eval.py" between
salt-2019.2.0.tar.gz and salt-2019.2.1.tar.gz

About: SaltStack is a systems management software for data center automation, cloud orchestration, server provisioning, configuration management and more. Community version.

test_eval.py  (salt-2019.2.0):test_eval.py  (salt-2019.2.1)
skipping to change at line 508 skipping to change at line 508
# Add the job to the scheduler # Add the job to the scheduler
self.schedule.opts.update(job) self.schedule.opts.update(job)
# Evaluate 1 second at the run time # Evaluate 1 second at the run time
self.schedule.eval(now=run_time1) self.schedule.eval(now=run_time1)
ret = self.schedule.job_status(job_name) ret = self.schedule.job_status(job_name)
self.assertNotIn('_last_run', ret) self.assertNotIn('_last_run', ret)
self.assertEqual(ret['_skip_reason'], 'disabled') self.assertEqual(ret['_skip_reason'], 'disabled')
def test_eval_global_disabled_job_enabled(self):
'''
verify that scheduled job does not run
'''
job_name = 'test_eval_global_disabled'
job = {
'schedule': {
'enabled': False,
job_name: {
'function': 'test.ping',
'when': '11/29/2017 4:00pm',
'enabled': True,
}
}
}
run_time1 = dateutil_parser.parse('11/29/2017 4:00pm')
# Add the job to the scheduler
self.schedule.opts.update(job)
# Evaluate 1 second at the run time
self.schedule.eval(now=run_time1)
ret = self.schedule.job_status(job_name)
self.assertNotIn('_last_run', ret)
self.assertEqual(ret['_skip_reason'], 'disabled')
def test_eval_run_on_start(self): def test_eval_run_on_start(self):
''' '''
verify that scheduled job is run when minion starts verify that scheduled job is run when minion starts
''' '''
job_name = 'test_eval_run_on_start' job_name = 'test_eval_run_on_start'
job = { job = {
'schedule': { 'schedule': {
job_name: { job_name: {
'function': 'test.ping', 'function': 'test.ping',
'hours': '1', 'hours': '1',
 End of changes. 1 change blocks. 
0 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)