package org.jenkinsci.plugins.p4.review; import com.cloudbees.plugins.credentials.CredentialsScope; import com.cloudbees.plugins.credentials.SystemCredentialsProvider; import com.gargoylesoftware.htmlunit.html.HtmlElement; import com.gargoylesoftware.htmlunit.html.HtmlPage; import hudson.model.FreeStyleProject; import org.jenkinsci.plugins.p4.DefaultEnvironment; 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 static org.junit.Assert.assertEquals; public class ReviewImplTest extends DefaultEnvironment { 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", "0", "0", null, "jenkins"); SystemCredentialsProvider.getInstance().getCredentials().add(auth); SystemCredentialsProvider.getInstance().save(); String client = defaultClient(); FreeStyleProject project = jenkins .createFreeStyleProject("StaticReview"); Workspace workspace = new StaticWorkspaceImpl("none", false, client); Populate populate = new AutoCleanImpl(); 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 | 21940 | Paul Allen | Branching using p4-jenkins | ||
//guest/perforce_software/p4jenkins/main/src/test/java/org/jenkinsci/plugins/p4/review/ReviewImplTest.java | |||||
#9 | 21154 | Paul Allen | P4HOST support for connection. | ||
#8 | 21146 | Paul Allen | Test Case support for Windows Clients. | ||
#7 | 19324 | Paul Allen |
Added Parallel Sync. An Advanced Populate option. Must specify the PATH to the ‘p4’ executable as parallel sync is not supported by p4java. JENKINS-29228 |
||
#6 | 16502 | Paul Allen |
Advanced Credentials option for RPC_SOCKET_SO_TIMEOUT_NICK JENKINS-31196 |
||
#5 | 15293 | Paul Allen |
Add retry attempts to Perforce Tasks. If a task fails due to an exception then the task will retry based on the value specified in the connection Credential. |
||
#4 | 12977 | Paul Allen | Quiet option for Populate. | ||
#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. |