@@ -23,6 +23,9 @@ def wait_for_job_setup(jenkins, job_name):
2323def test_get_scm_type (jenkins ):
2424 job_name = "git_%s" % random_string ()
2525 job = jenkins .create_job (job_name , SCM_GIT_JOB )
26+ queueItem = job .invoke ()
27+ queueItem .block_until_complete ()
28+
2629 wait_for_job_setup (jenkins , job_name )
2730 compare (job .get_scm_type (), "git" )
2831 jenkins .delete_job (job_name )
@@ -33,30 +36,36 @@ def test_get_scm_type_pipeline_scm_multibranch_BranchJobProperty(
3336):
3437 job_name = "git_%s" % random_string ()
3538 job = jenkins .create_job (job_name , MULTIBRANCH_GIT_BRANCH_JOB_PROPERTY )
39+ queueItem = job .invoke ()
40+ queueItem .block_until_complete ()
3641 wait_for_job_setup (jenkins , job_name )
3742 compare (job .get_scm_type (), "git" )
3843
3944
40- ### Disabling for now, running into permissions errors
41- # def test_get_scm_type_pipeline_scm_multibranch_BranchSource(
42- # jenkins,
43- # ):
44- # job_name = "git_%s" % random_string()
45- # job = jenkins.create_multibranch_pipeline_job(
46- # job_name, MULTIBRANCH_GIT_SCM_JOB
47- # )
48- # wait_for_job_setup(jenkins, job_name)
49- # job.invoke(block=True, delay=20)
50- # compare(job[0].get_scm_type(), "git")
51- #
52- #
53- # def test_get_scm_type_pipeline_github_multibranch_BranchSource(
54- # jenkins,
55- # ):
56- # job_name = "git_%s" % random_string()
57- # job = jenkins.create_multibranch_pipeline_job(
58- # job_name, MULTIBRANCH_GITHUB_SCM_JOB
59- # )
60- # wait_for_job_setup(jenkins, job_name)
61- # job.invoke(block=True, delay=20)
62- # compare(job.get_scm_type(), "github")
45+ ## Disabling for now, running into permissions errors
46+ def test_get_scm_type_pipeline_scm_multibranch_BranchSource (
47+ jenkins ,
48+ ):
49+ job_name = "git_%s" % random_string ()
50+ job = jenkins .create_multibranch_pipeline_job (
51+ job_name , MULTIBRANCH_GIT_SCM_JOB
52+ )
53+ queueItem = job .invoke ()
54+ queueItem .block_until_complete ()
55+ wait_for_job_setup (jenkins , job_name )
56+ job .invoke (block = True , delay = 20 )
57+ compare (job [0 ].get_scm_type (), "git" )
58+
59+
60+ def test_get_scm_type_pipeline_github_multibranch_BranchSource (
61+ jenkins ,
62+ ):
63+ job_name = "git_%s" % random_string ()
64+ job = jenkins .create_multibranch_pipeline_job (
65+ job_name , MULTIBRANCH_GITHUB_SCM_JOB
66+ )
67+ queueItem = job .invoke ()
68+ queueItem .block_until_complete ()
69+ wait_for_job_setup (jenkins , job_name )
70+ job .invoke (block = True , delay = 20 )
71+ compare (job .get_scm_type (), "github" )
0 commit comments