package org.jenkinsci.plugins.p4.review; import static org.junit.Assert.assertEquals; import hudson.model.FreeStyleProject; import org.jenkinsci.plugins.p4.PerforceScm; import org.jenkinsci.plugins.p4.credentials.P4PasswordImpl; import org.jenkinsci.plugins.p4.populate.AutoCleanImpl; import org.jenkinsci.plugins.p4.populate.Populate; import org.jenkinsci.plugins.p4.workspace.StaticWorkspaceImpl; import org.jenkinsci.plugins.p4.workspace.Workspace; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; import com.cloudbees.plugins.credentials.CredentialsScope; import com.cloudbees.plugins.credentials.SystemCredentialsProvider; import com.gargoylesoftware.htmlunit.html.HtmlElement; import com.gargoylesoftware.htmlunit.html.HtmlPage; public class ReviewImplTest { private final String credential = "id"; private final static String P4PORT = "localhost:1999"; @Rule public JenkinsRule jenkins = new JenkinsRule(); @Test public void testStaticReviewImpl() throws Exception { P4PasswordImpl auth = new P4PasswordImpl(CredentialsScope.SYSTEM, credential, "desc", P4PORT, null, "jenkins", "jenkins"); SystemCredentialsProvider.getInstance().getCredentials().add(auth); SystemCredentialsProvider.getInstance().save(); String client = "test.ws"; FreeStyleProject project = jenkins .createFreeStyleProject("StaticReview"); Workspace workspace = new StaticWorkspaceImpl("none", false, client); Populate populate = new AutoCleanImpl(true, true, false, null); PerforceScm scm = new PerforceScm(credential, workspace, populate); project.setScm(scm); project.save(); HtmlPage page = jenkins.createWebClient().getPage(project, "review"); HtmlElement review = page.getElementByName("review"); assertEquals(review.getAttribute("type"), "text"); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 11628 | Paul Allen | Branching using p4-jenkins-R1.1 | ||
//guest/perforce_software/p4jenkins/main/src/test/java/org/jenkinsci/plugins/p4/review/ReviewImplTest.java | |||||
#3 | 11472 | Paul Allen |
Pin the Workspace to the build host. Added a check box under the Workspace configuration to allow Jenkins to Pin the workspace, by setting the Host field. The hostname is resolved from the Computer object or InetAddress. |
||
#2 | 10841 | Paul Allen |
Support for 2014.1 reconcile by MODTIME Feature allows a user check the option ‘Sync with MODTIME for consistency check’ under the ‘Populate’ option to enable reconcile to check files based on MODTIME. Includes test case for MODTIME and minor fix for fetching a Label when there is no previous change. JENKINS-25341 |
||
#1 | 9690 | Paul Allen |
[Branching using p4-jenkins] Release 1.0.1 |
||
//guest/paul_allen/dev/p4-jenkins/p4-client/src/test/java/org/jenkinsci/plugins/p4/review/ReviewImplTest.java | |||||
#1 | 9672 | Paul Allen | Refactor name from 'p4_client' to 'p4'. | ||
//guest/paul_allen/dev/p4-jenkins/p4-client/src/test/java/org/jenkinsci/plugins/p4_client/review/ReviewImplTest.java | |||||
#3 | 9472 | Paul Allen |
Added support to pin build at a label in the populate configuration. - includes help and updates to tests. |
||
#2 | 9115 | Paul Allen |
Initial implementation of workspace Cleanup and Sync options. - Includes 3 modes: Automatic Clean/Sync, Force Clean/Sync, Sync Only Automatic Clean/Sync Uses reconcile to clean up workspace and sync changes. Force Clean/Sync Force sync of all files (does not remove files yet...) Sync Only Normal sync with no cleanup TODO: - remove of files in Force Clean/Sync mode - Inline help - Update docs - Add unit/functional tests |
||
#1 | 8888 | Paul Allen |
Extended test coverage for Workspace and Credentials. - Removed ununsed methods. |