Skip to content
Permalink
Browse files

Failing test for JENKINS-14900.

  • Loading branch information
davehunt committed Aug 22, 2012
1 parent c587a69 commit ecfa6f42aaf6c1bc40db7cd93703c733d152fed7
Showing with 16 additions and 1 deletion.
  1. +1 −1 pom.xml
  2. +15 −0 src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
@@ -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>
@@ -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());
@@ -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(),

0 comments on commit ecfa6f4

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