Skip to content

Commit

Permalink
Fixing test compilation due to changes for JENKINS-9582 and JENKINS-9…
Browse files Browse the repository at this point in the history
…577.
  • Loading branch information
abayer committed Jan 17, 2012
1 parent 46807bc commit a92fbe2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Expand Up @@ -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);
Expand Down
Expand Up @@ -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>
Expand Up @@ -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);

Expand Down Expand Up @@ -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());

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit a92fbe2

Please sign in to comment.