Author: bdelacretaz
Date: Fri Oct 7 13:16:20 2016
New Revision: 1763759
URL: http://svn.apache.org/viewvc?rev=1763759&view=rev
Log:
SLING-6113 - add test for future whitelist + refactoring work
Added:
sling/trunk/bundles/jcr/oak-server/src/test/java/org/apache/sling/jcr/oak/server/it/LoginAdminWhitelistedIT.java
Added:
sling/trunk/bundles/jcr/oak-server/src/test/java/org/apache/sling/jcr/oak/server/it/LoginAdminWhitelistedIT.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/oak-server/src/test/java/org/apache/sling/jcr/oak/server/it/LoginAdminWhitelistedIT.java?rev=1763759&view=auto
==============================================================================
---
sling/trunk/bundles/jcr/oak-server/src/test/java/org/apache/sling/jcr/oak/server/it/LoginAdminWhitelistedIT.java
(added)
+++
sling/trunk/bundles/jcr/oak-server/src/test/java/org/apache/sling/jcr/oak/server/it/LoginAdminWhitelistedIT.java
Fri Oct 7 13:16:20 2016
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package org.apache.sling.jcr.oak.server.it;
+
+import javax.inject.Inject;
+import org.apache.sling.api.resource.ResourceResolverFactory;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+
+/** Test login admin and get admin resource resolver - will be
+ * expanded to test the SLING-5135 whitelist later.
+ */
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class LoginAdminWhitelistedIT extends OakServerTestSupport {
+
+ @Inject
+ private ResourceResolverFactory resolverFactory;
+
+ @Test
+ @SuppressWarnings("deprecation")
+ public void testLoginAdmin() throws Exception {
+ repository.loginAdministrative(null);
+ }
+
+ @Test
+ public void testGetAdminResourceResolver() throws Exception {
+ resolverFactory.getAdministrativeResourceResolver(null);
+ }
+}