Search in sources :

Example 1 with SubversionSvmAdvanced

use of org.jenkinsci.test.acceptance.plugins.subversion.SubversionSvmAdvanced 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));
}
Also used : SvnContainer(org.jenkinsci.test.acceptance.docker.fixtures.SvnContainer) SubversionScm(org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm) SubversionSvmAdvanced(org.jenkinsci.test.acceptance.plugins.subversion.SubversionSvmAdvanced) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test) DockerTest(org.jenkinsci.test.acceptance.junit.DockerTest)

Aggregations

SvnContainer (org.jenkinsci.test.acceptance.docker.fixtures.SvnContainer)1 AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)1 DockerTest (org.jenkinsci.test.acceptance.junit.DockerTest)1 SubversionScm (org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm)1 SubversionSvmAdvanced (org.jenkinsci.test.acceptance.plugins.subversion.SubversionSvmAdvanced)1 FreeStyleJob (org.jenkinsci.test.acceptance.po.FreeStyleJob)1 Test (org.junit.Test)1