Skip to content
Permalink
Browse files

[JENKINS-14900] Added a test to reproduce JENKINS-14900 when flatten=…

…true.
  • Loading branch information
ikedam committed Jul 13, 2014
1 parent c04a128 commit 1f7f665a1840c56c622cd7533726a41532cdd5b1
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
@@ -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(),

0 comments on commit 1f7f665

Please sign in to comment.
You can’t perform that action at this time.