Skip to content
Permalink
Browse files
Fixing test compilation due to changes for JENKINS-9582 and JENKINS-9…
…577.
  • Loading branch information
abayer committed Jan 17, 2012
1 parent 46807bc commit a92fbe254e800b81720f91f2dcde09ffcf92b5d4
@@ -208,7 +208,7 @@ public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListene

public WorkspaceSnapshot snapshot(AbstractBuild<?,?> build, FilePath ws, DirScanner scanner, TaskListener listener, String archiveMethod) throws IOException, InterruptedException {
File wss = new File(build.getRootDir(), CloneWorkspaceUtil.getFileNameForMethod(archiveMethod));
if (archiveMethod == "ZIP") {
if (archiveMethod.equals("ZIP")) {
OutputStream os = new BufferedOutputStream(new FileOutputStream(wss));
try {
ws.zip(os, scanner);
@@ -38,8 +38,8 @@ THE SOFTWARE.
</f:entry>
<f:entry title="${%Archive method}" help="/plugin/clone-workspace-scm/archiveMethod.html">
<select name="archiveMethod">
<f:option value="TAR" selected='${instance.criteria=="TAR"}'>${%Gzipped tar}</f:option>
<f:option value="ZIP" selected='${instance.criteria=="ZIP"}'>${%Zipped}</f:option>
<f:option value="TAR" selected='${instance.archiveMethod=="TAR"}'>${%Gzipped tar}</f:option>
<f:option value="ZIP" selected='${instance.archiveMethod=="ZIP"}'>${%Zipped}</f:option>
</select>
</f:entry>
</j:jelly>
@@ -78,7 +78,7 @@ public void testSlaveCloning() throws Exception {
}

public void testGlobCloning() throws Exception {
FreeStyleProject parentJob = createCloneParentProject(new CloneWorkspacePublisher("moduleB/**/*", "Any"));
FreeStyleProject parentJob = createCloneParentProject(new CloneWorkspacePublisher("moduleB/**/*", null, "Any", "ZIP"));

buildAndAssertSuccess(parentJob);

@@ -133,7 +133,7 @@ public void testNotFailedCriteriaDoesAcceptUnstable() throws Exception {
}

public void testNotFailedParentCriteriaDoesNotArchiveFailure() throws Exception {
FreeStyleProject parentJob = createCloneParentProject(new CloneWorkspacePublisher("**/*", "Not Failed"));
FreeStyleProject parentJob = createCloneParentProject(new CloneWorkspacePublisher("**/*", null, "Not Failed", "ZIP"));

parentJob.getBuildersList().add(new FailureBuilder());

@@ -191,7 +191,7 @@ private FreeStyleProject createCloneChildProject(CloneWorkspaceSCM cws) throws E
}

private FreeStyleProject createCloneParentProject() throws Exception {
return createCloneParentProject(new CloneWorkspacePublisher("**/*", "Any"));
return createCloneParentProject(new CloneWorkspacePublisher("**/*", null, "Any", "zip"));
}

private FreeStyleProject createCloneParentProject(CloneWorkspacePublisher cwp) throws Exception {

0 comments on commit a92fbe2

Please sign in to comment.