use of org.jenkinsci.test.acceptance.docker.fixtures.SvnContainer 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.docker.fixtures.SvnContainer 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.docker.fixtures.SvnContainer 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.docker.fixtures.SvnContainer 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()));
}
use of org.jenkinsci.test.acceptance.docker.fixtures.SvnContainer in project acceptance-test-harness by jenkinsci.
the class SubversionPluginTest method run_basic_subversion_build_userPwd.
@Test
@WithCredentials(credentialType = WithCredentials.USERNAME_PASSWORD, values = { SvnContainer.USER, SvnContainer.PWD }, id = SvnContainer.USER)
public void run_basic_subversion_build_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.getUrlAuthenticatedRepo());
subversionScm.credentials.select(SvnContainer.USER);
f.save();
Build b = f.startBuild().shouldSucceed();
assertThat(b.getConsole(), Matchers.containsString("test -d .svn"));
}
Aggregations