Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-13165] Added a test to reproduce the problem to no avail.
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package hudson; | ||
|
||
import hudson.model.FreeStyleBuild; | ||
import hudson.model.FreeStyleProject; | ||
import hudson.util.StreamTaskListener; | ||
import org.jvnet.hudson.test.Bug; | ||
import org.jvnet.hudson.test.HudsonTestCase; | ||
|
||
/** | ||
* @author Kohsuke Kawaguchi | ||
*/ | ||
public class FileSystemProvisionerTest extends HudsonTestCase { | ||
@Bug(13165) | ||
public void test13165() throws Exception { | ||
FreeStyleProject p = createFreeStyleProject(); | ||
FreeStyleBuild b = assertBuildStatusSuccess(p.scheduleBuild2(0)); | ||
b.getWorkspace().child(".dot").touch(0); | ||
StreamTaskListener listener = StreamTaskListener.fromStdout(); | ||
|
||
WorkspaceSnapshot s = jenkins.getFileSystemProvisioner().snapshot(b, b.getWorkspace(), "**/*", listener); | ||
FilePath tmp = new FilePath(createTmpDir()); | ||
s.restoreTo(b, tmp,listener); | ||
assertTrue(tmp.child(".dot").exists()); | ||
} | ||
} |