forked from eficode/ClearCaseUCMPlugin
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix for JENKINS-18279] Updated core + added test
- Loading branch information
1 parent
fc1694d
commit bd1e8b5
Showing
3 changed files
with
64 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
src/test/java/net/praqma/hudson/test/integration/userstories/JENKINS18279.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package net.praqma.hudson.test.integration.userstories; | ||
|
||
import hudson.FilePath; | ||
import hudson.model.AbstractBuild; | ||
import hudson.model.FreeStyleProject; | ||
import hudson.model.Project; | ||
import hudson.model.Result; | ||
import net.praqma.clearcase.test.annotations.ClearCaseUniqueVobName; | ||
import net.praqma.clearcase.test.junit.ClearCaseRule; | ||
import net.praqma.hudson.test.BaseTestClass; | ||
import net.praqma.hudson.test.CCUCMRule; | ||
import net.praqma.hudson.test.SystemValidator; | ||
import net.praqma.util.test.junit.DescriptionRule; | ||
import net.praqma.util.test.junit.TestDescription; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.logging.Logger; | ||
|
||
/** | ||
* @author cwolfgang | ||
*/ | ||
public class JENKINS18279 extends BaseTestClass { | ||
|
||
private static Logger logger = Logger.getLogger( JENKINS18279.class.getName() ); | ||
|
||
@Rule | ||
public static ClearCaseRule ccenv = new ClearCaseRule( "JENKINS-18279" ); | ||
|
||
@Rule | ||
public static DescriptionRule desc = new DescriptionRule(); | ||
|
||
@Test | ||
@TestDescription( title = "JENKINS-18279", text = "Testing the swipe function. UPDT's must remain as non-view private files." ) | ||
public void jenkins18279() throws Exception { | ||
Project project = new CCUCMRule.ProjectCreator( "JENKINS-18279", "_System@" + ccenv.getPVob(), "one_int@" + ccenv.getPVob() ).setSwipe( true ).getProject(); | ||
|
||
/* I need a first build */ | ||
jenkins.getProjectBuilder( project ).build(); | ||
|
||
FilePath path = new FilePath( project.getLastBuiltOn().getWorkspaceFor( (FreeStyleProject)project ), "view/" ); | ||
FilePath[] names = path.list( "*.updt" ); | ||
|
||
listPath( path ); | ||
|
||
AbstractBuild build1 = jenkins.getProjectBuilder( project ).build(); | ||
|
||
SystemValidator validator = new SystemValidator( build1 ).validateBuild( Result.SUCCESS ); | ||
|
||
for( FilePath n : names ) { | ||
validator.addElementToPathCheck( path, new SystemValidator.Element( n.getName(), true ) ); | ||
} | ||
|
||
validator.validate(); | ||
} | ||
|
||
|
||
} |