예제 #1
0
def test_job_run():
    assert rundeck_api.job_run(test_job_id).success, 'job_run call was unsuccessful'
    time.sleep(1)
    assert rundeck_api.job_run(test_job_id, argString={'from': 'test_job_run'}).success, \
        'job_run with argument dict call was unsuccessful'
    time.sleep(1)
    assert rundeck_api.job_run(test_job_id, argString='-from test_job_run').success, \
        'job_run with argument string call was unsuccessful'
예제 #2
0
def test_job_run():
    time.sleep(3)
    assert rundeck_api.job_run(test_job_id).success, 'job_run call was unsuccessful'
    time.sleep(3)
    assert rundeck_api.job_run(test_job_id, argString={'from': 'test_job_run'}).success, \
        'job_run with argument dict call was unsuccessful'
    time.sleep(3)
    assert rundeck_api.job_run(test_job_id, argString='-from test_job_run').success, \
        'job_run with argument string call was unsuccessful'
예제 #3
0
def test_execution_output():
    time.sleep(1)
    execution = transforms['execution'](rundeck_api.job_run(test_job_id))
    time.sleep(1)
    execution_id = execution['id']
    assert rundeck_api.execution_output(execution_id).status_code == requests.codes.ok, \
        'execution_output call was unsuccessful'
예제 #4
0
def test_execution():
    time.sleep(1)
    execution = transforms['execution'](rundeck_api.job_run(test_job_id))
    time.sleep(1)
    execution_id = execution['id']
    assert rundeck_api.execution(
        execution_id).success, 'execution call was unsuccessful'
예제 #5
0
def test_execution_abort():
    execution = transforms['execution'](rundeck_api.job_run(test_job_id, argString={'sleep': 30}))
    time.sleep(1)
    execution_id = execution['id']
    assert rundeck_api.execution_abort(execution_id).success, 'execution_abort call was unsuccessful'
    time.sleep(1)
    execution = transforms['execution'](rundeck_api.execution(execution_id))
    assert execution['status'] == 'aborted', 'execution_abort status is not \'aborted\''
예제 #6
0
def test_execution_abort():
    time.sleep(1)
    execution = transforms['execution'](rundeck_api.job_run(test_job_id, argString={'sleep': 30}))
    time.sleep(1)
    execution_id = execution['id']
    assert rundeck_api.execution_abort(execution_id).success, 'execution_abort call was unsuccessful'
    time.sleep(1)
    execution = transforms['execution'](rundeck_api.execution(execution_id))
    assert execution['status'] == 'aborted', 'execution_abort status is not \'aborted\''
예제 #7
0
def test_execution():
    time.sleep(1)
    execution = transforms['execution'](rundeck_api.job_run(test_job_id))
    time.sleep(1)
    execution_id = execution['id']
    assert rundeck_api.execution(execution_id).success, 'execution call was unsuccessful'