Skip to content
Permalink
Browse files
[JENKINS-13165] Added a test to reproduce the problem to no avail.
  • Loading branch information
kohsuke committed Mar 22, 2012
1 parent d1c3203 commit 2b5a24c9b0ec6c3f1feedde080aa3196f419ae40
Showing with 25 additions and 0 deletions.
  1. +25 −0 test/src/test/java/hudson/FileSystemProvisionerTest.java
@@ -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());
}
}

0 comments on commit 2b5a24c

Please sign in to comment.