# Path: test/framework/api_select.py
# def api(file_name, api_type, login=None, fixed_prefix=None, url_or_dir=None, fake_public_uri=None, invocation_class=None,
#         username=None, password=None):


from jenkinsflow.flow import serial, parallel
from .framework import api_select
        api.job('j12', max_fails=0, expect_invocations=1, expect_order=1)
        api.job('j13_fail_unchecked', max_fails=1, expect_invocations=1, expect_order=2)
        api.job('j14', max_fails=0, expect_invocations=1, expect_order=2, exec_time=5)
        api.job('j15_unchecked', max_fails=0, expect_invocations=1, expect_order=None, exec_time=30, unknown_result=True)

        with serial(api, timeout=70, job_name_prefix=api.job_name_prefix, report_interval=1) as ctrl1:
            ctrl1.invoke_unchecked('j11_unchecked')
            ctrl1.invoke('j12')
            ctrl1.invoke_unchecked('j13_fail_unchecked')
            ctrl1.invoke('j14')
            ctrl1.invoke_unchecked('j15_unchecked')


def test_invoke_unchecked_parallel_fails(api_type):
    with api_select.api(__file__, api_type, login=True) as api:
        api.job('j11_unchecked', max_fails=0, expect_invocations=1, expect_order=None, exec_time=30, unknown_result=True)
        api.job('j12', max_fails=0, expect_invocations=1, expect_order=1)
        api.job('j13_fail_unchecked', max_fails=1, expect_invocations=1, expect_order=1)
        api.job('j14', max_fails=0, expect_invocations=1, expect_order=1, exec_time=5)
        api.job('j15_unchecked', max_fails=0, expect_invocations=1, expect_order=1)

        with parallel(api, timeout=70, job_name_prefix=api.job_name_prefix, report_interval=1) as ctrl1:
            ctrl1.invoke_unchecked('j11_unchecked')
            ctrl1.invoke('j12')
            ctrl1.invoke_unchecked('j13_fail_unchecked')
            ctrl1.invoke('j14')
            ctrl1.invoke_unchecked('j15_unchecked')


def test_invoke_unchecked_mix_fails(api_type):

# Path: test/framework/api_select.py
# def api(file_name, api_type, login=None, fixed_prefix=None, url_or_dir=None, fake_public_uri=None, invocation_class=None,
#         username=None, password=None):


# Path: test/invoke_unchecked_test.py
from jenkinsflow.flow import serial, parallel
from .framework import api_select

        api.job('j12', max_fails=0, expect_invocations=1, expect_order=1)
        api.job('j13_fail_unchecked', max_fails=1, expect_invocations=1, expect_order=2)
        api.job('j14', max_fails=0, expect_invocations=1, expect_order=2, exec_time=5)
        api.job('j15_unchecked', max_fails=0, expect_invocations=1, expect_order=None, exec_time=30, unknown_result=True)

        with serial(api, timeout=70, job_name_prefix=api.job_name_prefix, report_interval=1) as ctrl1:
            ctrl1.invoke_unchecked('j11_unchecked')
            ctrl1.invoke('j12')
            ctrl1.invoke_unchecked('j13_fail_unchecked')
            ctrl1.invoke('j14')
            ctrl1.invoke_unchecked('j15_unchecked')


def test_invoke_unchecked_parallel_fails(api_type):
    with api_select.api(__file__, api_type, login=True) as api:
        api.job('j11_unchecked', max_fails=0, expect_invocations=1, expect_order=None, exec_time=30, unknown_result=True)
        api.job('j12', max_fails=0, expect_invocations=1, expect_order=1)
        api.job('j13_fail_unchecked', max_fails=1, expect_invocations=1, expect_order=1)
        api.job('j14', max_fails=0, expect_invocations=1, expect_order=1, exec_time=5)
        api.job('j15_unchecked', max_fails=0, expect_invocations=1, expect_order=1)

        with parallel(api, timeout=70, job_name_prefix=api.job_name_prefix, report_interval=1) as ctrl1:
            ctrl1.invoke_unchecked('j11_unchecked')
            ctrl1.invoke('j12')
            ctrl1.invoke_unchecked('j13_fail_unchecked')
            ctrl1.invoke('j14')
            ctrl1.invoke_unchecked('j15_unchecked')


def test_invoke_unchecked_mix_fails(api_type):

    with api_select.api(__file__, api_type, login=True) as api: