}
}
@Bug(777)
public void testDepthOptions() throws Exception {
Proc p = runSvnServe(getClass().getResource("JENKINS-777.zip"));
try {
FreeStyleProject b = createFreeStyleProject();
ModuleLocation[] locations = {
new ModuleLocation("svn://localhost/jenkins-777/proja", "empty", "empty", true),
new ModuleLocation("svn://localhost/jenkins-777/proja", "files", "files", true),
new ModuleLocation("svn://localhost/jenkins-777/proja", "immediates", "immediates", true),
new ModuleLocation("svn://localhost/jenkins-777/proja", "infinity", "infinity", true)
};
b.setScm(new SubversionSCM(Arrays.asList(locations), new CheckoutUpdater(), null, null, null, null, null, null));
FreeStyleBuild build = assertBuildStatusSuccess(b.scheduleBuild2(0));
FilePath ws = build.getWorkspace();
// Test if file file1 exists for various depths
assertTrue(!(ws.child("empty").child("file1").exists()));
assertTrue(ws.child("files").child("file1").exists());
assertTrue(ws.child("immediates").child("file1").exists());
assertTrue(ws.child("infinity").child("file1").exists());
// Test if directory subdir exists for various depths
assertTrue(!(ws.child("empty").child("subdir").exists()));
assertTrue(!(ws.child("files").child("subdir").exists()));
assertTrue(ws.child("immediates").child("subdir").exists());
assertTrue(ws.child("infinity").child("subdir").exists());
// Test if file subdir/file3 exists for various depths
assertTrue(!(ws.child("empty").child("subdir").child("file3").exists()));
assertTrue(!(ws.child("files").child("subdir").child("file3").exists()));
assertTrue(!(ws.child("immediates").child("subdir").child("file3").exists()));
assertTrue(ws.child("infinity").child("subdir").child("file3").exists());
} finally {
p.kill();
}
}