Skip to content
Permalink
Browse files

Merge pull request #12 from davehunt/JENKINS-14900-TEST

Failing test for JENKINS-14900.

Conflicts:
	pom.xml
  • Loading branch information
ikedam committed Jul 13, 2014
2 parents b33ceb5 + ecfa6f4 commit c04a128b5e0642b9519c8949024439d146750ad9
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
@@ -121,6 +121,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());
@@ -421,6 +423,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 c04a128

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