use of org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm 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"));
}
use of org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm in project acceptance-test-harness by jenkinsci.
the class SubversionPluginTest method run_basic_subversion_build_svn_userPwd.
@Test
@WithCredentials(credentialType = WithCredentials.USERNAME_PASSWORD, values = { SvnContainer.USER, SvnContainer.PWD }, id = SvnContainer.USER)
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());
subversionScm.credentials.select(SvnContainer.USER);
f.save();
Build b = f.startBuild().shouldSucceed();
assertThat(b.getConsole(), Matchers.containsString("test -d .svn"));
}
use of org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm in project acceptance-test-harness by jenkinsci.
the class SubversionPluginTest method build_has_changes_and_repoBrowser.
@Test
public void build_has_changes_and_repoBrowser() throws SubversionPluginTestException {
final SvnContainer svnContainer = svn.get();
final FreeStyleJob f = jenkins.jobs.create();
final SubversionScm subversionScm = f.useScm(SubversionScm.class);
subversionScm.url.set(svnContainer.getUrlUnauthenticatedRepoAtRevision(1));
final SvnRepositoryBrowserWebSvn repositoryBrowserWebSvn = subversionScm.useRepositoryBrowser(SvnRepositoryBrowserWebSvn.class);
repositoryBrowserWebSvn.url.set(svnContainer.getUrlViewVC());
f.save();
f.startBuild().shouldSucceed();
f.configure();
subversionScm.url.set(svnContainer.getUrlUnauthenticatedRepoAtRevision(2));
f.save();
f.startBuild().shouldSucceed();
final Changes changes = f.getLastBuild().getChanges();
assertTrue("Build has no diff link.", changes.hasDiffFileLink("testOne.txt"));
}
use of org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm in project acceptance-test-harness by jenkinsci.
the class SubversionPluginTest method clean_checkout.
@Test
public void clean_checkout() 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.CLEAN_CHECKOUT);
f.addShellStep("echo test > unversioned.txt");
f.save();
f.startBuild().shouldSucceed();
f.configure();
f.removeFirstBuildStep();
f.addShellStep("test ! -f unversioned.txt");
f.save();
f.startBuild().shouldSucceed();
}
use of org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm in project acceptance-test-harness by jenkinsci.
the class SubversionPluginTest method poll_for_changes.
@Test
public void poll_for_changes() throws SubversionPluginTestException {
final SvnContainer svnContainer = svn.get();
JenkinsConfig jc = new JenkinsConfig(jenkins);
jc.configure();
jc.setQuietPeriod(0);
jc.save();
final FreeStyleJob f = jenkins.jobs.create();
final SubversionScm subversionScm = f.useScm(SubversionScm.class);
subversionScm.url.set(svnContainer.getUrlUnauthenticatedRepoAtRevision(1));
f.save();
f.startBuild().shouldSucceed();
f.configure();
subversionScm.url.set(svnContainer.getUrlUnauthenticatedRepoAtRevision(2));
f.pollScm().schedule("* * * * *");
f.addShellStep("test -d .svn");
f.save();
elasticSleep(10000);
f.build(1).waitUntilFinished().shouldSucceed();
}
Aggregations