Author: tmaret Date: Mon Dec 12 19:25:05 2016 New Revision: 1773859 URL: http://svn.apache.org/viewvc?rev=1773859&view=rev Log: SLING-5233 - Remove getAdministrativeResourceResolver() usage from org.apache.sling.i18n
* Adjust PaxExam test setup for ResourceBundleProviderIT Added: sling/trunk/bundles/extensions/i18n/src/test/resources/repoinit.txt Modified: sling/trunk/bundles/extensions/i18n/src/test/java/org/apache/sling/i18n/it/ResourceBundleProviderIT.java Modified: sling/trunk/bundles/extensions/i18n/src/test/java/org/apache/sling/i18n/it/ResourceBundleProviderIT.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/i18n/src/test/java/org/apache/sling/i18n/it/ResourceBundleProviderIT.java?rev=1773859&r1=1773858&r2=1773859&view=diff ============================================================================== --- sling/trunk/bundles/extensions/i18n/src/test/java/org/apache/sling/i18n/it/ResourceBundleProviderIT.java (original) +++ sling/trunk/bundles/extensions/i18n/src/test/java/org/apache/sling/i18n/it/ResourceBundleProviderIT.java Mon Dec 12 19:25:05 2016 @@ -29,6 +29,7 @@ import static org.ops4j.pax.exam.CoreOpt import static org.ops4j.pax.exam.CoreOptions.when; import java.io.File; +import java.net.URISyntaxException; import java.util.Locale; import java.util.ResourceBundle; @@ -159,6 +160,13 @@ public class ResourceBundleProviderIT { .create(true) .put("enabled", true) .asOption(), + ConfigurationAdminOptions.factoryConfiguration("org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended") + .create(true) + .put("user.mapping", new String[]{"org.apache.sling.i18n=sling-i18n"}) + .asOption(), + ConfigurationAdminOptions.newConfiguration("org.apache.sling.jcr.repoinit.impl.RepositoryInitializer") + .put("references", new String[]{references()}) + .asOption(), // logging systemProperty("pax.exam.logging").value("none"), @@ -216,6 +224,9 @@ public class ResourceBundleProviderIT { mavenBundle("org.apache.sling", "org.apache.sling.jcr.jcr-wrapper", "2.0.0"), mavenBundle("org.apache.sling", "org.apache.sling.jcr.api", "2.4.0"), mavenBundle("org.apache.sling", "org.apache.sling.jcr.base", "2.4.0"), + mavenBundle("org.apache.sling", "org.apache.sling.jcr.repoinit", "1.1.0"), + mavenBundle("org.apache.sling", "org.apache.sling.repoinit.parser", "1.1.0"), + mavenBundle("org.apache.sling", "org.apache.sling.provisioning.model", "1.4.2"), mavenBundle("com.google.guava", "guava", "15.0"), mavenBundle("org.apache.jackrabbit", "jackrabbit-api", jackrabbitVersion), @@ -365,4 +376,13 @@ public class ResourceBundleProviderIT { session.save(); assertMessages(MSG_KEY2, "EN_changed", "EN_changed", "EN_changed"); } + + private String references() { + try { + String repoInitUrl = getClass().getResource("/repoinit.txt").toURI().toString(); + return String.format("raw:%s", repoInitUrl); + } catch (URISyntaxException e) { + throw new RuntimeException("Failed to compute repoinit references", e); + } + } } Added: sling/trunk/bundles/extensions/i18n/src/test/resources/repoinit.txt URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/i18n/src/test/resources/repoinit.txt?rev=1773859&view=auto ============================================================================== --- sling/trunk/bundles/extensions/i18n/src/test/resources/repoinit.txt (added) +++ sling/trunk/bundles/extensions/i18n/src/test/resources/repoinit.txt Mon Dec 12 19:25:05 2016 @@ -0,0 +1,23 @@ +################################################################################ +# +# 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. +# +################################################################################ + +# sling-i18n + +create service user sling-i18n +