summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-rest
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2017-03-10 22:09:08 +0100
committerMartin Stockhammer <martin_s@apache.org>2017-03-10 22:09:08 +0100
commita981c1847c11d880c082f4f04c390256a92cf72e (patch)
tree1f9789f021ff8ec9cfa00dd0f1dd4bcc5020a75b /archiva-modules/archiva-web/archiva-rest
parentb2ce531fa25df5ca4f92619acf63ab986c49c392 (diff)
downloadarchiva-a981c1847c11d880c082f4f04c390256a92cf72e.tar.gz
archiva-a981c1847c11d880c082f4f04c390256a92cf72e.zip
Fixing test cases for rest service
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rest')
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml15
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/security.properties19
2 files changed, 34 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
index 9488526d1..9b95b9430 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
@@ -83,6 +83,21 @@
<constructor-arg value="${appserver.base}/jcr"/>
</bean>
+ <bean name="commons-configuration" class="org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry"
+ init-method="initialize">
+ <property name="properties">
+ <value>
+ <![CDATA[
+ <configuration>
+ <system/>
+ <properties fileName="${basedir}/src/test/resources/security.properties" config-optional="true"
+ config-at="org.apache.archiva.redback"/>
+ </configuration>
+ ]]>
+ </value>
+ </property>
+ </bean>
+
<alias name="userConfiguration#redback" alias="userConfiguration#default"/>
<alias name="authorizer#rbac" alias="authorizer#default"/>
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/security.properties b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/security.properties
new file mode 100644
index 000000000..3607f9f6f
--- /dev/null
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/security.properties
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+rest.csrffilter.disableTokenValidation=true