Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 c04a128
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
Expand Up @@ -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());
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit c04a128

Please sign in to comment.