提交 2b5a24c9 编写于 作者: K Kohsuke Kawaguchi

[JENKINS-13165] Added a test to reproduce the problem to no avail.

上级 d1c3203c
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());
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册