Fixing test cases for rest service
Project: http://git-wip-us.apache.org/repos/asf/archiva/repo Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/a981c184 Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/a981c184 Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/a981c184 Branch: refs/heads/master Commit: a981c1847c11d880c082f4f04c390256a92cf72e Parents: b2ce531 Author: Martin Stockhammer <[email protected]> Authored: Fri Mar 10 22:09:08 2017 +0100 Committer: Martin Stockhammer <[email protected]> Committed: Fri Mar 10 22:09:08 2017 +0100 ---------------------------------------------------------------------- .../resources/META-INF/spring-context-test.xml | 15 +++++++++++++++ .../src/test/resources/security.properties | 19 +++++++++++++++++++ .../org/apache/archiva/security.properties | 19 +++++++++++++++++++ 3 files changed, 53 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/archiva/blob/a981c184/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml ---------------------------------------------------------------------- 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 9488526..9b95b94 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"/> http://git-wip-us.apache.org/repos/asf/archiva/blob/a981c184/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/security.properties ---------------------------------------------------------------------- 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 0000000..3607f9f --- /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 http://git-wip-us.apache.org/repos/asf/archiva/blob/a981c184/archiva-modules/archiva-web/archiva-web-common/src/test/resources/org/apache/archiva/security.properties ---------------------------------------------------------------------- diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/org/apache/archiva/security.properties b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/org/apache/archiva/security.properties new file mode 100644 index 0000000..3607f9f --- /dev/null +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/org/apache/archiva/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
