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'
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'
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'
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'
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\''
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\''
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'