continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1395456 - in /continuum/trunk: continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedReleaseTest.java continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java
Date Mon, 08 Oct 2012 05:55:39 GMT
Author: brett
Date: Mon Oct  8 05:55:39 2012
New Revision: 1395456

URL: http://svn.apache.org/viewvc?rev=1395456&view=rev
Log:
[CONTINUUM-2685] support no build environment being specified on release perform as well

Modified:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedReleaseTest.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedReleaseTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedReleaseTest.java?rev=1395456&r1=1395455&r2=1395456&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedReleaseTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedReleaseTest.java
Mon Oct  8 05:55:39 2012
@@ -282,8 +282,19 @@ public class DistributedReleaseTest
         releasePrepareProject( "", "", tagBase, tag, releaseVersion, developmentVersion,
"" );
 
         assertReleasePhaseSuccess();
+        clickButtonWithValue( "Done" );
 
         assertPreparedReleasesFileContainsBuildAgent();
+
+        // test subsequent perform
+        selectPerformAndSubmit();
+
+        setFieldValue( "goals", "clean validate" );
+        submit();
+
+        waitForRelease();
+
+        assertReleasePhaseSuccess();
     }
 
     @Test( dependsOnMethods = {"testReleasePrepareProjectWithNoBuildEnvironment"} )
@@ -301,6 +312,21 @@ public class DistributedReleaseTest
         assertPreparedReleasesFileContainsBuildAgent();
     }
 
+    @Test( dependsOnMethods = {"testReleasePrepareProjectWithNoBuildEnvironment"} )
+    public void testReleasePerformUsingProvidedParametersWithNoBuildEnvironment()
+        throws Exception
+    {
+        String releaseUsername = "invalid";
+        String releasePassword = "invalid";
+
+        showProjectGroup( projectGroupName, projectGroupId, "" );
+        clickButtonWithValue( RELEASE_BUTTON_TEXT );
+        assertReleaseChoicePage();
+        releasePerformProjectWithProvideParameters( releaseUsername, releasePassword, tagBase,
tag,
+                                                    releaseProjectScmUrl, "" );
+        assertPreparedReleasesFileContainsBuildAgent();
+    }
+
     private void createBuildEnvAndBuildagentGroup( String projectBuildEnv, String projectAgentGroup
)
     {
         // add build agent group no agents

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java?rev=1395456&r1=1395455&r2=1395456&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePerformAction.java
Mon Oct  8 05:55:39 2012
@@ -260,13 +260,14 @@ public class ReleasePerformAction
             LocalRepository repository = project.getProjectGroup().getLocalRepository();
 
             DistributedReleaseManager releaseManager = getContinuum().getDistributedReleaseManager();
-            Map<String, String> environments = new HashMap<String, String>();
 
+            Profile profile = null;
             if ( profileId != -1 )
             {
-                Profile profile = getContinuum().getProfileService().getProfile( profileId
);
-                environments = getEnvironments( profile, releaseManager.getDefaultBuildagent(
projectId ) );
+                profile = getContinuum().getProfileService().getProfile( profileId );
             }
+            Map<String, String> environments =
+                getEnvironments( profile, releaseManager.getDefaultBuildagent( projectId
) );
 
             try
             {



Mime
View raw message