Skip to content

Commit

Permalink
Failing test for JENKINS-14900.
Browse files Browse the repository at this point in the history
  • Loading branch information
davehunt committed Aug 22, 2012
1 parent c587a69 commit ecfa6f4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.424</version>
<version>1.456</version>
</parent>

<artifactId>copyartifact</artifactId>
Expand Down
15 changes: 15 additions & 0 deletions src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
Expand Up @@ -98,6 +98,8 @@ public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListene
ws.child("subdir/subfoo.txt").touch(System.currentTimeMillis());
ws.child("deepfoo/a/b").mkdirs();
ws.child("deepfoo/a/b/c.log").touch(System.currentTimeMillis());
ws.child(".hg").mkdirs();
ws.child(".hg/defaultexclude.txt").touch(System.currentTimeMillis());
// For matrix tests write one more file:
String foo = build.getBuildVariables().get("FOO");
if (foo != null) ws.child(foo + ".txt").touch(System.currentTimeMillis());
Expand Down Expand Up @@ -383,6 +385,19 @@ public void testCopyFromWorkspace() throws Exception {
assertFile(false, "c.log", b);
}

/** Test copy from workspace containing default ant excludes */
public void testCopyFromWorkspaceWithDefaultExcludes() throws Exception {
FreeStyleProject other = createFreeStyleProject(), p = createFreeStyleProject();
p.getBuildersList().add(new CopyArtifact(other.getName(), new WorkspaceSelector(),
"", "", false, 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, ".hg/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 ecfa6f4

Please sign in to comment.