Skip to content

Commit

Permalink
[JENKINS-29340] Some comments have been added to pollingWithEnvInject…
Browse files Browse the repository at this point in the history
… test
  • Loading branch information
Manuel Recena committed Aug 19, 2015
1 parent 21bde20 commit d89f530
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/test/java/hudson/scm/SubversionEnvInjectTest.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.jenkinsci.plugins.envinject.EnvInjectJobPropertyInfo; import org.jenkinsci.plugins.envinject.EnvInjectJobPropertyInfo;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule; import org.jvnet.hudson.test.JenkinsRule;


import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
Expand All @@ -17,6 +18,10 @@ public class SubversionEnvInjectTest {
@Rule @Rule
public JenkinsRule jenkins = new JenkinsRule(); public JenkinsRule jenkins = new JenkinsRule();


/**
* This test aims to verify that the variables defined in the "Properties Content" field, are availables in SCM Polling.
*/
@Issue("JENKINS-29340")
@Test @Test
public void pollingWithEnvInject() throws Exception { public void pollingWithEnvInject() throws Exception {
FreeStyleProject project = jenkins.createFreeStyleProject(); FreeStyleProject project = jenkins.createFreeStyleProject();
Expand All @@ -31,6 +36,7 @@ public void pollingWithEnvInject() throws Exception {


TaskListener listener = jenkins.createTaskListener(); TaskListener listener = jenkins.createTaskListener();
PollingResult poll = project.poll(listener); PollingResult poll = project.poll(listener);
// If true means that parameters have been replaced correctly and we have a valid repository URL.
assertTrue(poll.hasChanges()); assertTrue(poll.hasChanges());


jenkins.assertBuildStatusSuccess(project.scheduleBuild2(0).get()); jenkins.assertBuildStatusSuccess(project.scheduleBuild2(0).get());
Expand Down

0 comments on commit d89f530

Please sign in to comment.