Skip to content

Commit

Permalink
[JENKINS-14900] Added a test to reproduce JENKINS-14900 when flatten=…
Browse files Browse the repository at this point in the history
…true.
  • Loading branch information
ikedam committed Jul 13, 2014
1 parent c04a128 commit 1f7f665
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
Expand Up @@ -436,6 +436,18 @@ public void testCopyFromWorkspaceWithDefaultExcludes() throws Exception {
assertFile(true, ".hg/defaultexclude.txt", b);
}

public void testCopyFromWorkspaceWithDefaultExcludesWithFlatten() throws Exception {
FreeStyleProject other = createFreeStyleProject(), p = createFreeStyleProject();
p.getBuildersList().add(new CopyArtifact(other.getName(), "", new WorkspaceSelector(),
"", "", true, false));
// Run a build that places a file in the workspace, but does not archive anything
other.getBuildersList().add(new ArtifactBuilder());
assertBuildStatusSuccess(other.scheduleBuild2(0, new UserCause()).get());
FreeStyleBuild b = p.scheduleBuild2(0, new UserCause()).get();
assertBuildStatusSuccess(b);
assertFile(true, "defaultexclude.txt", b);
}

/** projectName in CopyArtifact build steps should be updated if a job is renamed */
public void testJobRename() throws Exception {
FreeStyleProject other = createFreeStyleProject(),
Expand Down

0 comments on commit 1f7f665

Please sign in to comment.