@@ -51,11 +51,12 @@ func commentBodyHash(body string) string {
5151 return digest
5252}
5353
54- func TestGithubPullRequest (t * testing.T ) {
54+ func TestGithubGHEPullRequestBasic (t * testing.T ) {
5555 ctx := context .Background ()
5656 g := & tgithub.PRTest {
5757 Label : "Github PullRequest" ,
5858 YamlFiles : []string {"testdata/pipelinerun.yaml" },
59+ GHE : true ,
5960 }
6061 g .RunPullRequest (ctx , t )
6162 defer g .TearDown (ctx , t )
@@ -642,22 +643,23 @@ func TestGithubGHEPullRequestNoPipelineRunCancelledOnPRClosed(t *testing.T) {
642643 assert .Equal (t , false , isCancelled , fmt .Sprintf ("PipelineRun got cancelled while we wanted it `Running`, last reason: %v" , prReason ))
643644}
644645
645- func TestGithubCancelInProgressSettingFromConfigMapOnPR (t * testing.T ) {
646+ func TestGithubGHECancelInProgressSettingFromConfigMapOnPR (t * testing.T ) {
646647 ctx := context .Background ()
647- ctx , runcnx , _ , _ , err := tgithub .Setup (ctx , false , false )
648+ ctx , runcnx , _ , _ , err := tgithub .Setup (ctx , true , false )
648649 assert .NilError (t , err )
649650
650651 patchData := map [string ]string {
651652 "enable-cancel-in-progress-on-pull-requests" : "true" ,
652653 }
653654
654- configMapTearDown := configmap .ChangeGlobalConfig (ctx , t , runcnx , patchData )
655+ configMapTearDown := configmap .ChangeGlobalConfig (ctx , t , runcnx , "ghe-configmap" , patchData )
655656 defer configMapTearDown ()
656657
657658 g := & tgithub.PRTest {
658659 Label : "Github PullRequest" ,
659660 YamlFiles : []string {"testdata/pipelinerun-gitops.yaml" },
660661 NoStatusCheck : true ,
662+ GHE : true ,
661663 }
662664 g .RunPullRequest (ctx , t )
663665 defer g .TearDown (ctx , t )
@@ -687,22 +689,23 @@ func TestGithubCancelInProgressSettingFromConfigMapOnPR(t *testing.T) {
687689 assert .NilError (t , err )
688690}
689691
690- func TestGithubCancelInProgressSettingFromConfigMapOnPush (t * testing.T ) {
692+ func TestGithubGHECancelInProgressSettingFromConfigMapOnPush (t * testing.T ) {
691693 ctx := context .Background ()
692- ctx , runcnx , _ , _ , err := tgithub .Setup (ctx , false , false )
694+ ctx , runcnx , _ , _ , err := tgithub .Setup (ctx , true , false )
693695 assert .NilError (t , err )
694696
695697 patchData := map [string ]string {
696698 "enable-cancel-in-progress-on-push" : "true" ,
697699 }
698700
699- configMapTearDown := configmap .ChangeGlobalConfig (ctx , t , runcnx , patchData )
701+ configMapTearDown := configmap .ChangeGlobalConfig (ctx , t , runcnx , "ghe-configmap" , patchData )
700702 defer configMapTearDown ()
701703
702704 g := & tgithub.PRTest {
703705 Label : "Github PullRequest" ,
704706 YamlFiles : []string {"testdata/pipelinerun-gitops.yaml" },
705707 NoStatusCheck : true ,
708+ GHE : true ,
706709 }
707710 g .RunPushRequest (ctx , t )
708711 defer g .TearDown (ctx , t )
0 commit comments