package org.jenkinsci.plugins.p4_client; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import hudson.model.FreeStyleProject; import hudson.scm.SCM; import org.jenkinsci.plugins.p4_client.populate.AutoCleanImpl; import org.jenkinsci.plugins.p4_client.populate.Populate; import org.jenkinsci.plugins.p4_client.workspace.StaticWorkspaceImpl; import org.jenkinsci.plugins.p4_client.workspace.Workspace; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; public class PerforceScmTest { @Rule public JenkinsRule jenkins = new JenkinsRule(); @Test public void testConfigBasic() throws Exception { FreeStyleProject project = jenkins.createFreeStyleProject(); String credential = "123"; Workspace workspace = new StaticWorkspaceImpl("none", "test.ws"); Populate populate = new AutoCleanImpl(true, true, null); PerforceScm scm = new PerforceScm(credential, workspace, populate); project.setScm(scm); SCM testScm = project.getScm(); assertEquals("org.jenkinsci.plugins.p4_client.PerforceScm", testScm.getType()); assertTrue(testScm.supportsPolling()); assertTrue(testScm.requiresWorkspaceForPolling()); assertEquals(testScm, project.getScm()); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#6 | 9672 | Paul Allen | Refactor name from 'p4_client' to 'p4'. | ||
#5 | 9472 | Paul Allen |
Added support to pin build at a label in the populate configuration. - includes help and updates to tests. |
||
#4 | 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 |
||
#3 | 8902 | Paul Allen |
Updated test cases: Pushed Workspace 'charset' to abstract Workspace class. Minor bugfixes in Workspace AutoCompletionCandidates method. |
||
#2 | 8898 | Paul Allen | Removed Deprecated 'HudsonTestCase' for Jenkins @Rule | ||
#1 | 8761 | Paul Allen | Basic unit tests for PerforceScm configuration and Credentials. |