File D:\maven-qcr-plugin-testsunitaires\qcr4java\jenkins-master\target\site\qc\test\src\test\java\hudson\FileSystemProvisionerTest.java.html

1 package hudson;
2
3 import hudson.model.FreeStyleBuild;
4 import hudson.model.FreeStyleProject;
5 import hudson.util.StreamTaskListener;
6 import org.jvnet.hudson.test.Bug;
7 import org.jvnet.hudson.test.HudsonTestCase;
8
9 /**
10 * @author Kohsuke Kawaguchi
11 */
12 public class FileSystemProvisionerTest extends HudsonTestCase {
13 @Bug(13165)
14 public void test13165() throws Exception {
15 FreeStyleProject p = createFreeStyleProject();
16 FreeStyleBuild b = assertBuildStatusSuccess(p.scheduleBuild2(0));
17 b.getWorkspace().child(".dot").touch(0);
18 StreamTaskListener listener = StreamTaskListener.fromStdout();
19
20 WorkspaceSnapshot s = jenkins.getFileSystemProvisioner().snapshot(b, b.getWorkspace(), "**/*", listener);
21 FilePath tmp = new FilePath(createTmpDir());
22 s.restoreTo(b, tmp,listener);
23 assertTrue(tmp.child(".dot").exists());
24 }
25 }
26