File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/test/java/org/gitlab4j/api Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 1212import org .gitlab4j .api .models .Pipeline ;
1313import org .gitlab4j .api .models .PipelineSchedule ;
1414import org .gitlab4j .api .models .Project ;
15+ import org .gitlab4j .api .models .RepositoryFile ;
1516import org .gitlab4j .api .models .Trigger ;
1617import org .junit .AfterClass ;
1718import org .junit .Before ;
@@ -182,6 +183,13 @@ public void testTriggerAndCancelPipeline() throws GitLabApiException {
182183
183184 assertNotNull (testProject );
184185
186+ // Skip this test if no .gitlab-ci.yml file is found in the test project
187+ RepositoryFile fileInfo = null ;
188+ try {
189+ fileInfo = gitLabApi .getRepositoryFileApi ().getFileInfo (testProject , ".gitlab-ci.yml" , "master" );
190+ } catch (GitLabApiException ignore ) {}
191+ assumeNotNull (fileInfo );
192+
185193 String triggerDescription = TRIGGER_DESCRIPTION + " - test triggerPipeline() - " + HelperUtils .getRandomInt (1000 );
186194 Trigger createdTrigger = gitLabApi .getPipelineApi ().createPipelineTrigger (testProject , triggerDescription );
187195 assertNotNull (createdTrigger );
You can’t perform that action at this time.
0 commit comments