Skip to content

Commit

Permalink
[JENKINS-14702]Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgarnet committed Aug 7, 2012
1 parent 6130ade commit 6dc80db
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
@@ -0,0 +1,36 @@
package net.praqma.hudson.test.integration.userstories;

import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;

import hudson.model.AbstractBuild;
import hudson.model.Result;
import net.praqma.hudson.test.CCUCMRule;
import net.praqma.hudson.test.SystemValidator;
import net.praqma.junit.DescriptionRule;
import net.praqma.junit.TestDescription;

import net.praqma.clearcase.test.junit.ClearCaseRule;

public class JENKINS14702 {

@ClassRule
public static CCUCMRule jenkins = new CCUCMRule();

@Rule
public static ClearCaseRule ccenv = new ClearCaseRule( "JENKINS-14702", "setup-JENKINS-14702.xml" );

@Rule
public static DescriptionRule desc = new DescriptionRule();

@Test
@TestDescription( title = "JENKINS-14702", text = "Use the current streams project, if the jenkins build project is not found", configurations = { "Jenkins project = not created" } )
public void jenkins13944() throws Exception {

AbstractBuild<?, ?> build = jenkins.initiateBuild( ccenv.getUniqueName(), "self", "_System@" + ccenv.getPVob(), "one_int@" + ccenv.getPVob(), false, false, false, false, false, false );
new SystemValidator( build ).validateBuild( Result.FAILURE ).validateBuiltBaselineNotFound().validate();
}


}
18 changes: 18 additions & 0 deletions src/test/resources/setup-JENKINS-14702.xml
@@ -0,0 +1,18 @@
<ccenvs xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="src/test/resources/setup-basic.xml"/>

<ccenv name="JENKINS 14702">

<context mvfs="m:\" linux="/view" view="${name}_one_int" vob="${vobname}"/>

<activity comment="" headline="Adding initial files into components" in="one_int" name="initial_files" pvob="${pvobname}" />

<setactivity activity="initial_files" pvob="${pvobname}" />

<!-- Add element -->
<add file="Model/model.h" content="#1" />

<baseline name="model-1" label="full" comment="" component="_System" pvob="${pvobname}" />

</ccenv>
</ccenvs>

0 comments on commit 6dc80db

Please sign in to comment.