Beispiel #1
0
 def test_enable_job(self):
     '''
     Tests enabling a job
     '''
     self.schedule.opts.update({'schedule': {'name': {'enabled': 'foo'}}})
     Schedule.enable_job(self.schedule, 'name')
     self.assertTrue(self.schedule.opts['schedule']['name']['enabled'])
Beispiel #2
0
 def test_enable_job_pillar(self):
     '''
     Tests ignoring enable a job from pillar
     '''
     self.schedule.opts.update({'pillar': {'schedule': {'name': {'enabled': False}}}})
     Schedule.enable_job(self.schedule, 'name', persist=False)
     self.assertFalse(self.schedule.opts['pillar']['schedule']['name']['enabled'])
Beispiel #3
0
def test_enable_job(schedule):
    """
    Tests enabling a job
    """
    schedule.opts.update({"schedule": {"name": {"enabled": "foo"}}})
    Schedule.enable_job(schedule, "name")
    assert schedule.opts["schedule"]["name"]["enabled"]
Beispiel #4
0
 def test_enable_job_pillar(self):
     '''
     Tests enabling a job in pillar
     '''
     self.schedule.opts.update({'pillar': {'schedule': {'name': {'enabled': 'foo'}}}})
     Schedule.enable_job(self.schedule, 'name', persist=False, where='pillar')
     self.assertTrue(self.schedule.opts['pillar']['schedule']['name']['enabled'])
Beispiel #5
0
 def test_enable_job(self):
     '''
     Tests enabling a job
     '''
     self.schedule.opts.update({'schedule': {'name': {'enabled': 'foo'}}})
     Schedule.enable_job(self.schedule, 'name')
     self.assertTrue(self.schedule.opts['schedule']['name']['enabled'])
Beispiel #6
0
 def test_enable_job(self):
     """
     Tests enabling a job
     """
     self.schedule.opts.update({"schedule": {"name": {"enabled": "foo"}}})
     Schedule.enable_job(self.schedule, "name")
     self.assertTrue(self.schedule.opts["schedule"]["name"]["enabled"])
Beispiel #7
0
 def test_enable_job_pillar(self):
     '''
     Tests enabling a job in pillar
     '''
     self.schedule.opts.update({'pillar': {'schedule': {'name': {'enabled': 'foo'}}}})
     Schedule.enable_job(self.schedule, 'name', persist=False, where='pillar')
     del self.schedule.opts['sock_dir']
     self.assertTrue(self.schedule.opts['pillar']['schedule']['name']['enabled'])
Beispiel #8
0
 def test_enable_job(self):
     '''
     Tests enabling a job
     '''
     self.schedule.opts = {'schedule': {'name': {'enabled': 'foo'}},
                           'sock_dir': SOCK_DIR}
     Schedule.enable_job(self.schedule, 'name')
     del self.schedule.opts['sock_dir']
     self.assertTrue(self.schedule.opts['schedule']['name']['enabled'])
Beispiel #9
0
 def test_enable_job_pillar(self):
     '''
     Tests enabling a job in pillar
     '''
     self.schedule.opts = {'pillar': {'schedule': {'name': {'enabled': 'foo'}}},
                           'sock_dir': SOCK_DIR}
     Schedule.enable_job(self.schedule, 'name', persist=False, where='pillar')
     del self.schedule.opts['sock_dir']
     self.assertTrue(self.schedule.opts['pillar']['schedule']['name']['enabled'])
Beispiel #10
0
 def test_enable_job(self):
     '''
     Tests enabling a job
     '''
     self.schedule.opts = {'schedule': {'name': {'enabled': 'foo'}},
                           'sock_dir': SOCK_DIR}
     Schedule.enable_job(self.schedule, 'name')
     del self.schedule.opts['sock_dir']
     self.assertTrue(self.schedule.opts['schedule']['name']['enabled'])
Beispiel #11
0
def test_enable_job_pillar(schedule):
    """
    Tests ignoring enable a job from pillar
    """
    schedule.opts.update(
        {"pillar": {
            "schedule": {
                "name": {
                    "enabled": False
                }
            }
        }})
    Schedule.enable_job(schedule, "name", persist=False)
    assert not schedule.opts["pillar"]["schedule"]["name"]["enabled"]
Beispiel #12
0
 def test_enable_job_pillar(self):
     '''
     Tests enabling a job in pillar
     '''
     self.schedule.opts = {
         'pillar': {
             'schedule': {
                 'name': {
                     'enabled': 'foo'
                 }
             }
         }
     }
     Schedule.enable_job(self.schedule, 'name', where='pillar')
     self.assertTrue(
         self.schedule.opts['pillar']['schedule']['name']['enabled'])