]> source.dussan.org Git - archiva.git/commitdiff
fix tests after struts upgrade
authorBrett Porter <brett@apache.org>
Sun, 2 Feb 2014 03:42:37 +0000 (03:42 +0000)
committerBrett Porter <brett@apache.org>
Sun, 2 Feb 2014 03:42:37 +0000 (03:42 +0000)
Context no longer automatically populated

git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-1.3.x@1563564 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/AbstractActionTestCase.java

index 67f2dfd615afa15b9fba10dec446f8f7b6aeceed..6e50b0a41c7f323cf4084d0d62282d11abc0977c 100644 (file)
@@ -19,8 +19,10 @@ package org.apache.maven.archiva.web.action;
  * under the License.
  */
 
+import java.util.HashMap;
 import java.util.List;
 
+import com.opensymphony.xwork2.ActionContext;
 import org.apache.maven.archiva.model.ArchivaProjectModel;
 import org.apache.maven.archiva.security.UserRepositories;
 import org.apache.maven.archiva.security.UserRepositoriesStub;
@@ -75,6 +77,15 @@ public abstract class AbstractActionTestCase
 
     protected static final String TEST_SCM_URL = "scmUrl";
 
+    @Override
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        ActionContext.setContext( new ActionContext( new HashMap<String, Object>() ) );
+    }
+
     protected void setObservableRepos( List<String> repoIds )
     {
         UserRepositoriesStub repos = (UserRepositoriesStub) lookup( UserRepositories.class );