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 12
12
import org .gitlab4j .api .models .Pipeline ;
13
13
import org .gitlab4j .api .models .PipelineSchedule ;
14
14
import org .gitlab4j .api .models .Project ;
15
+ import org .gitlab4j .api .models .RepositoryFile ;
15
16
import org .gitlab4j .api .models .Trigger ;
16
17
import org .junit .AfterClass ;
17
18
import org .junit .Before ;
@@ -182,6 +183,13 @@ public void testTriggerAndCancelPipeline() throws GitLabApiException {
182
183
183
184
assertNotNull (testProject );
184
185
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
+
185
193
String triggerDescription = TRIGGER_DESCRIPTION + " - test triggerPipeline() - " + HelperUtils .getRandomInt (1000 );
186
194
Trigger createdTrigger = gitLabApi .getPipelineApi ().createPipelineTrigger (testProject , triggerDescription );
187
195
assertNotNull (createdTrigger );
You can’t perform that action at this time.
0 commit comments