Skip to content

Commit

Permalink
Updated test for JENKINS-29033
Browse files Browse the repository at this point in the history
  • Loading branch information
MadsNielsen committed Jul 6, 2015
1 parent bb78a2d commit 38efbbe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Expand Up @@ -64,7 +64,6 @@ public void testRecommended() throws Exception {

AbstractBuild<?, ?> build = initiateBuild("rec-" + ccenv.getUniqueName(), true, false, false, false);

//Question: Why do we not validate that the BUILT baseline in promoted??
SystemValidator validator = new SystemValidator(build)
.validateBuild(Result.SUCCESS)
.validateBuildView()
Expand Down
Expand Up @@ -6,6 +6,7 @@
import org.junit.Test;

import hudson.model.AbstractBuild;
import net.praqma.clearcase.test.annotations.ClearCaseUniqueVobName;
import net.praqma.clearcase.ucm.entities.Baseline;
import net.praqma.clearcase.ucm.entities.Stream;
import net.praqma.clearcase.ucm.entities.Project.PromotionLevel;
Expand All @@ -14,14 +15,18 @@
import net.praqma.clearcase.test.junit.ClearCaseRule;
import net.praqma.hudson.CCUCMBuildAction;
import net.praqma.hudson.scm.pollingmode.PollSiblingMode;
import net.praqma.util.test.junit.DescriptionRule;
import net.praqma.util.test.junit.TestDescription;


public class BaselinesFound extends BaseTestClass {

@Rule
public ClearCaseRule ccenv = new ClearCaseRule( "ccucm", "setup-interproject.xml" );


@Rule
public DescriptionRule desc = new DescriptionRule();

public AbstractBuild<?, ?> initiateBuild( String projectName, boolean recommend, boolean tag, boolean description, boolean fail ) throws Exception {
PollSiblingMode mode = new PollSiblingMode("INTIAL");
mode.setCreateBaseline(true);
Expand All @@ -37,6 +42,8 @@ public class BaselinesFound extends BaseTestClass {
}

@Test
@TestDescription(text = "Basic poll sibling, default options", title = "Poll sibling")
@ClearCaseUniqueVobName(name="sib-basic")
public void basicSibling() throws Exception {

Stream one = ccenv.context.streams.get( "one_int" );
Expand All @@ -57,6 +64,8 @@ public void basicSibling() throws Exception {
}

@Test
@TestDescription(text = "Poll sibling with hyperlinks", title = "Poll sibling, using hyperlins")
@ClearCaseUniqueVobName(name = "sib-hlink-basic")
public void basicSiblingUsingHlink() throws Exception {

/* The baseline that should be built */
Expand All @@ -74,6 +83,7 @@ public void basicSiblingUsingHlink() throws Exception {
}

@Test
@ClearCaseUniqueVobName(name = "sib-hlink-rec")
@TestDescription(title = "Poll sibling with hyperlink", text = "poll sibling with hyperlink, build success, promote baseline and recommend")
public void basicSiblingUsingHlinkRecommend() throws Exception {

Expand All @@ -91,6 +101,7 @@ public void basicSiblingUsingHlinkRecommend() throws Exception {
}

@Test
@ClearCaseUniqueVobName(name = "sib-hlink-norec")
@TestDescription(title = "Poll sibling", text = "poll sibling, build fails, reject baseline, no baseline created, no recommend")
public void basicSiblingUsingHlinkDoNotRecommend() throws Exception {

Expand Down

0 comments on commit 38efbbe

Please sign in to comment.