use of org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm in project acceptance-test-harness by jenkinsci.
the class SubversionPluginTest method poll_for_changes_excluded.
@Test
public void poll_for_changes_excluded() throws SubversionPluginTestException {
final SvnContainer svnContainer = svn.get();
final FreeStyleJob f = jenkins.jobs.create();
final SubversionScm subversionScm = f.useScm(SubversionScm.class);
subversionScm.url.set(svnContainer.getUrlUnsaveRepoAtRevision(1));
// EXCLUDE THE CHANGES TO REV 2
final SubversionSvmAdvanced scmAdvanced = subversionScm.advanced();
scmAdvanced.excludedRegions.set(".*\\.txt");
f.save();
f.startBuild().shouldSucceed();
f.configure();
subversionScm.url.set(svnContainer.getUrlUnsaveRepoAtRevision(2));
f.pollScm().schedule("* * * * *");
f.save();
elasticSleep(70000);
// We should not have a second build after 70 seconds
assertThat(f.getNextBuildNumber(), CoreMatchers.is(2));
}
use of org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm in project acceptance-test-harness by jenkinsci.
the class Subversion_Version154_PluginTest method run_basic_subversion_build_svn_userPwd.
@Test
public void run_basic_subversion_build_svn_userPwd() throws SubversionPluginTestException {
final SvnContainer svnContainer = svn.get();
final FreeStyleJob f = jenkins.jobs.create();
f.addShellStep("test -d .svn");
final SubversionScm subversionScm = f.useScm(SubversionScm.class);
subversionScm.url.set(svnContainer.getSvnUrl());
final SubversionCredentialUserPwd credentialPage = subversionScm.getCredentialPage(SubversionCredentialUserPwd.class);
credentialPage.setUsername(SvnContainer.USER);
credentialPage.setPassword(SvnContainer.PWD);
credentialPage.confirmDialog();
f.save();
f.startBuild().shouldSucceed().shouldContainsConsoleOutput("test -d .svn");
}
use of org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm in project acceptance-test-harness by jenkinsci.
the class Subversion_Version154_PluginTest method always_checkout_fresh_copy.
@Test
public void always_checkout_fresh_copy() throws SubversionPluginTestException {
final SvnContainer svnContainer = svn.get();
final FreeStyleJob f = jenkins.jobs.create();
final SubversionScm subversionScm = f.useScm(SubversionScm.class);
subversionScm.url.set(svnContainer.getUrlUnsaveRepo());
subversionScm.checkoutStrategy.select(SubversionScm.ALWAYS_FRESH_COPY);
f.save();
f.startBuild().shouldSucceed();
f.startBuild().shouldSucceed().shouldContainsConsoleOutput("Checking out " + svnContainer.getUrlUnsaveRepo());
}
use of org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm in project acceptance-test-harness by jenkinsci.
the class MultipleScmsPluginTest method checkout_several_scms.
@Test
public void checkout_several_scms() {
FreeStyleJob job = jenkins.jobs.create();
job.configure();
MultipleScms scms = job.useScm(MultipleScms.class);
GitScm git = scms.addScm(GitScm.class);
git.url("git://github.com/jenkinsci/acceptance-test-harness.git");
git.localDir("git-project");
SubversionScm svn = scms.addScm(SubversionScm.class);
svn.url.set("http://svn.apache.org/repos/asf/subversion/trunk/build/");
svn.local.set("svn-project");
job.addShellStep("test -d svn-project/.svn && test -f git-project/pom.xml");
job.save();
job.startBuild().shouldSucceed();
}
use of org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm in project acceptance-test-harness by jenkinsci.
the class SubversionPluginTest method always_checkout_fresh_copy.
@Test
public void always_checkout_fresh_copy() throws SubversionPluginTestException {
final SvnContainer svnContainer = svn.get();
final FreeStyleJob f = jenkins.jobs.create();
final SubversionScm subversionScm = f.useScm(SubversionScm.class);
subversionScm.url.set(svnContainer.getUrlUnauthenticatedRepo());
subversionScm.checkoutStrategy.select(SubversionScm.ALWAYS_FRESH_COPY);
f.save();
f.startBuild().shouldSucceed();
Build b = f.startBuild().shouldSucceed();
assertThat(b.getConsole(), Matchers.containsString("Checking out " + svnContainer.getUrlUnauthenticatedRepo()));
}
Aggregations