Search in sources :

Example 1 with Change

use of org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory.Change in project acceptance-test-harness by jenkinsci.

the class JobConfigHistoryPluginTest method track_change_in_matrix_project.

@Test
@Issue("JENKINS-24410")
@WithPlugins("matrix-project")
public void track_change_in_matrix_project() {
    MatrixProject job = jenkins.jobs.create(MatrixProject.class);
    JobConfigHistory history = job.action(JobConfigHistory.class);
    List<Change> original = history.getChanges();
    job.configure();
    job.runSequentially.check();
    job.save();
    List<Change> newOnes = history.getChanges();
    assertThat("New changes saved", newOnes.size(), greaterThan(original.size()));
}
Also used : JobConfigHistory(org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory) Change(org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory.Change) MatrixProject(org.jenkinsci.test.acceptance.po.MatrixProject) Issue(org.jvnet.hudson.test.Issue) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test) WithPlugins(org.jenkinsci.test.acceptance.junit.WithPlugins)

Example 2 with Change

use of org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory.Change in project acceptance-test-harness by jenkinsci.

the class JobConfigHistoryPluginTest method track_change_in_maven_project.

@Test
@Issue("JENKINS-24410")
@WithPlugins("maven-plugin")
public void track_change_in_maven_project() {
    MavenModuleSet job = jenkins.jobs.create(MavenModuleSet.class);
    JobConfigHistory history = job.action(JobConfigHistory.class);
    List<Change> original = history.getChanges();
    job.configure();
    job.goals.set("clean");
    job.save();
    List<Change> newOnes = history.getChanges();
    assertThat("New changes saved", newOnes.size(), greaterThan(original.size()));
}
Also used : JobConfigHistory(org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory) Change(org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory.Change) MavenModuleSet(org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet) Issue(org.jvnet.hudson.test.Issue) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test) WithPlugins(org.jenkinsci.test.acceptance.junit.WithPlugins)

Aggregations

AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)2 WithPlugins (org.jenkinsci.test.acceptance.junit.WithPlugins)2 JobConfigHistory (org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory)2 Change (org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory.Change)2 Test (org.junit.Test)2 Issue (org.jvnet.hudson.test.Issue)2 MavenModuleSet (org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet)1 MatrixProject (org.jenkinsci.test.acceptance.po.MatrixProject)1