示例#1
0
def test__start_running_job(stateless_job):
    stateless_job.create()

    stateless_job.wait_for_all_pods_running()
    old_pod_infos = stateless_job.query_pods()

    stateless_job.start()
    new_pod_infos = stateless_job.query_pods()
    # start should be a noop for already running instances
    assert_pod_id_equal(old_pod_infos, new_pod_infos)
示例#2
0
def test__create_update_update_job_config(stateless_job):
    stateless_job.create()
    stateless_job.wait_for_all_pods_running()
    old_pod_infos = stateless_job.query_pods()
    update = StatelessUpdate(
        stateless_job,
        updated_job_file=UPDATE_STATELESS_JOB_JOB_CONFIG_UPDATE_SPEC)
    update.create()
    update.wait_for_state(goal_state="SUCCEEDED")
    new_pod_infos = stateless_job.query_pods()
    assert_pod_id_equal(old_pod_infos, new_pod_infos)