Search in sources :

Example 1 with Changes

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

Example 2 with Changes

use of org.jenkinsci.test.acceptance.po.Changes in project acceptance-test-harness by jenkinsci.

the class SubversionPluginTest method build_has_no_changes.

@Test
public void build_has_no_changes() 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());
    f.save();
    f.startBuild();
    final Changes changes = f.getLastBuild().getChanges();
    assertFalse("Build has changes.", changes.hasChanges());
}
Also used : Changes(org.jenkinsci.test.acceptance.po.Changes) SvnContainer(org.jenkinsci.test.acceptance.docker.fixtures.SvnContainer) SubversionScm(org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm) 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)

Example 3 with Changes

use of org.jenkinsci.test.acceptance.po.Changes in project acceptance-test-harness by jenkinsci.

the class SubversionPluginTest method build_has_changes.

@Test
public void build_has_changes() 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));
    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 changes.", changes.hasChanges());
}
Also used : Changes(org.jenkinsci.test.acceptance.po.Changes) SvnContainer(org.jenkinsci.test.acceptance.docker.fixtures.SvnContainer) SubversionScm(org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm) 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)3 AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)3 DockerTest (org.jenkinsci.test.acceptance.junit.DockerTest)3 SubversionScm (org.jenkinsci.test.acceptance.plugins.subversion.SubversionScm)3 Changes (org.jenkinsci.test.acceptance.po.Changes)3 FreeStyleJob (org.jenkinsci.test.acceptance.po.FreeStyleJob)3 Test (org.junit.Test)3 SvnRepositoryBrowserWebSvn (org.jenkinsci.test.acceptance.plugins.subversion.SvnRepositoryBrowserWebSvn)1