88from jenkinsapi_tests .systests .job_configs import (
99 SCM_GIT_JOB ,
1010 MULTIBRANCH_GIT_BRANCH_JOB_PROPERTY ,
11+ MULTIBRANCH_GIT_SCM_JOB ,
12+ MULTIBRANCH_GITHUB_SCM_JOB ,
1113)
1214
1315
@@ -23,6 +25,9 @@ def wait_for_job_setup(jenkins, job_name):
2325def test_get_scm_type (jenkins ):
2426 job_name = "git_%s" % random_string ()
2527 job = jenkins .create_job (job_name , SCM_GIT_JOB )
28+ queueItem = job .invoke ()
29+ queueItem .block_until_complete ()
30+
2631 wait_for_job_setup (jenkins , job_name )
2732 compare (job .get_scm_type (), "git" )
2833 jenkins .delete_job (job_name )
@@ -33,30 +38,36 @@ def test_get_scm_type_pipeline_scm_multibranch_BranchJobProperty(
3338):
3439 job_name = "git_%s" % random_string ()
3540 job = jenkins .create_job (job_name , MULTIBRANCH_GIT_BRANCH_JOB_PROPERTY )
41+ queueItem = job .invoke ()
42+ queueItem .block_until_complete ()
3643 wait_for_job_setup (jenkins , job_name )
3744 compare (job .get_scm_type (), "git" )
3845
3946
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")
47+ ## Disabling for now, running into permissions errors
48+ def test_get_scm_type_pipeline_scm_multibranch_BranchSource (
49+ jenkins ,
50+ ):
51+ job_name = "git_%s" % random_string ()
52+ job = jenkins .create_multibranch_pipeline_job (
53+ job_name , MULTIBRANCH_GIT_SCM_JOB
54+ )
55+ queueItem = job .invoke ()
56+ queueItem .block_until_complete ()
57+ wait_for_job_setup (jenkins , job_name )
58+ job .invoke (block = True , delay = 20 )
59+ compare (job [0 ].get_scm_type (), "git" )
60+
61+
62+ def test_get_scm_type_pipeline_github_multibranch_BranchSource (
63+ jenkins ,
64+ ):
65+ job_name = "git_%s" % random_string ()
66+ job = jenkins .create_multibranch_pipeline_job (
67+ job_name , MULTIBRANCH_GITHUB_SCM_JOB
68+ )
69+ queueItem = job .invoke ()
70+ queueItem .block_until_complete ()
71+ wait_for_job_setup (jenkins , job_name )
72+ job .invoke (block = True , delay = 20 )
73+ compare (job .get_scm_type (), "github" )
0 commit comments