You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2018/01/30 09:42:16 UTC
[sling-org-apache-sling-repoinit-it] 01/30: SLING-5449 - move the
repoinit modules under extensions, they do contain Sling-specific stuff
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-repoinit-it.git
commit 7a5fb2e8a74bd2895ed705eb4ad15992cf20083d
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu May 19 12:50:58 2016 +0000
SLING-5449 - move the repoinit modules under extensions, they do contain Sling-specific stuff
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1744564 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 211 +++++++++++++++++++++
src/main/provisioning/model.txt | 30 +++
.../junit/teleporter/customizers/ITCustomizer.java | 34 ++++
.../org/apache/sling/repoinit/it/RepoInitIT.java | 155 +++++++++++++++
.../java/org/apache/sling/repoinit/it/Retry.java | 55 ++++++
.../java/org/apache/sling/repoinit/it/WaitFor.java | 50 +++++
src/test/resources/logback-test.xml | 49 +++++
src/test/resources/repoinit.txt | 43 +++++
8 files changed, 627 insertions(+)
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..7e5d5f4
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>sling</artifactId>
+ <version>26</version>
+ <relativePath/>
+ </parent>
+
+ <artifactId>org.apache.sling.repoinit.it</artifactId>
+ <packaging>slingstart</packaging>
+ <version>0.0.1-SNAPSHOT</version>
+ <name>Apache Sling RepoInit Integration Tests</name>
+ <description>
+ Integration tests for the RepoInit modules
+ </description>
+
+ <scm>
+ <connection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/repoinit/it</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/repoinit/it</developerConnection>
+ <url>https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/repoinit/it</url>
+ </scm>
+
+ <properties>
+ <!-- Timeout when checking for Sling readyness before starting tests -->
+ <HttpTestBase.readyTimeoutSeconds>62</HttpTestBase.readyTimeoutSeconds>
+
+ <!-- path suffix for HTTP access to Sling -->
+ <http.base.path/>
+
+ <!-- path suffix for WebDAV access to the repository -->
+ <webdav.workspace.path/>
+
+ <!-- hostname for integration tests -->
+ <test.host>localhost</test.host>
+
+ <!--
+ Set this to true to stop mvn once the integration test Jetty instance is
+ started. Useful to manually test the integration testing webapp.
+ -->
+ <integration.test.wait>false</integration.test.wait>
+
+ <!--
+ if set to "true" this will start the launchpad with the following debug options:
+ -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
+ otherwise you can provide your own debug settings
+ -->
+ <debug.options/>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>reserve-network-port</id>
+ <goals>
+ <goal>reserve-network-port</goal>
+ </goals>
+ <phase>process-resources</phase>
+ <configuration>
+ <portNames>
+ <portName>http.port</portName>
+ <portName>sling.control.port</portName>
+ </portNames>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <runOrder>alphabetical</runOrder>
+ <systemPropertyVariables>
+ <launchpad.http.server.url>http://${test.host}:${http.port}/</launchpad.http.server.url>
+ <launchpad.webdav.server.url>http://${test.host}:${http.port}/${webdav.workspace.path}</launchpad.webdav.server.url>
+ <HttpTestBase.readyTimeoutSeconds>${HttpTestBase.readyTimeoutSeconds}</HttpTestBase.readyTimeoutSeconds>
+ <launchpad.ready.1>GET:/index.html:200:.*Welcome to the Sling Launchpad.*</launchpad.ready.1>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>slingstart-maven-plugin</artifactId>
+ <version>1.3.6</version>
+ <extensions>true</extensions>
+ <executions>
+ <execution>
+ <id>start-container</id>
+ <goals>
+ <goal>start</goal>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <servers>
+ <server>
+ <port>${http.port}</port>
+ <controlPort>${sling.control.port}</controlPort>
+ <runmode>jackrabbit</runmode>
+ <contextPath>${http.base.path}</contextPath>
+ <debug>${debug.options}</debug>
+ </server>
+ </servers>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>1.7.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>1.9.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.commons.testing</artifactId>
+ <version>2.0.18</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.jcr</groupId>
+ <artifactId>jcr</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit-dep</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>asm</groupId>
+ <artifactId>asm</artifactId>
+ </exclusion>
+ </exclusions>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.jcr</groupId>
+ <artifactId>jcr</artifactId>
+ <version>2.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.junit.teleporter</artifactId>
+ <version>1.0.7-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.testing.tools</artifactId>
+ <version>1.0.10</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/src/main/provisioning/model.txt b/src/main/provisioning/model.txt
new file mode 100644
index 0000000..01ad176
--- /dev/null
+++ b/src/main/provisioning/model.txt
@@ -0,0 +1,30 @@
+#
+# 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.
+#
+[feature name=sling]
+
+[artifacts]
+ org.apache.sling/org.apache.sling.launchpad/8/slingstart
+ org.apache.sling/org.apache.sling.junit.core/1.0.14
+ org.apache.sling/org.apache.sling.testing.tools/1.0.10
+
+ org.apache.sling/org.apache.sling.repoinit.oak-jcr/0.0.1-SNAPSHOT
+ org.apache.sling/org.apache.sling.repoinit.parser/0.0.1-SNAPSHOT
+
+[settings]
+ org.apache.sling.commons.log.julenabled=true
\ No newline at end of file
diff --git a/src/test/java/org/apache/sling/junit/teleporter/customizers/ITCustomizer.java b/src/test/java/org/apache/sling/junit/teleporter/customizers/ITCustomizer.java
new file mode 100644
index 0000000..668eda9
--- /dev/null
+++ b/src/test/java/org/apache/sling/junit/teleporter/customizers/ITCustomizer.java
@@ -0,0 +1,34 @@
+/*
+ * 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.junit.teleporter.customizers;
+
+import org.apache.sling.junit.rules.TeleporterRule;
+import org.apache.sling.testing.teleporter.client.ClientSideTeleporter;
+import org.apache.sling.testing.tools.sling.TimeoutsProvider;
+
+public class ITCustomizer implements TeleporterRule.Customizer {
+
+ public static final String BASE_URL_PROP = "launchpad.http.server.url";
+ @Override
+ public void customize(TeleporterRule t, String options) {
+ final ClientSideTeleporter cst = (ClientSideTeleporter)t;
+ cst.setBaseUrl(System.getProperty(BASE_URL_PROP, BASE_URL_PROP + "_IS_NOT_SET"));
+ cst.setServerCredentials("admin", "admin");
+ cst.includeDependencyPrefix("org.apache.sling.repoinit.it");
+ cst.setTestReadyTimeoutSeconds(TimeoutsProvider.getInstance().getTimeout(5));
+ }
+}
diff --git a/src/test/java/org/apache/sling/repoinit/it/RepoInitIT.java b/src/test/java/org/apache/sling/repoinit/it/RepoInitIT.java
new file mode 100644
index 0000000..b40742f
--- /dev/null
+++ b/src/test/java/org/apache/sling/repoinit/it/RepoInitIT.java
@@ -0,0 +1,155 @@
+/*
+ * 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.repoinit.it;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.UUID;
+
+import javax.jcr.AccessDeniedException;
+import javax.jcr.LoginException;
+import javax.jcr.Node;
+import javax.jcr.PathNotFoundException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.SimpleCredentials;
+
+import org.apache.jackrabbit.api.JackrabbitSession;
+import org.apache.jackrabbit.api.security.user.Authorizable;
+import org.apache.sling.jcr.api.SlingRepository;
+import org.apache.sling.junit.rules.TeleporterRule;
+import org.apache.sling.repoinit.jcr.JcrRepoInitOpVisitor;
+import org.apache.sling.repoinit.parser.RepoInitParser;
+import org.apache.sling.repoinit.parser.operations.Operation;
+import org.apache.sling.repoinit.parser.operations.OperationVisitor;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/** Test service users and ACLs set from a text file. */
+public class RepoInitIT {
+
+ private Session session;
+ private static final String FRED_WILMA = "fredWilmaService";
+ private static final String ANOTHER = "anotherService";
+
+ public static final String REPO_INIT_FILE = "/repoinit.txt";
+
+ @Rule
+ public TeleporterRule teleporter = TeleporterRule
+ .forClass(getClass(), "IT")
+ .withResources(REPO_INIT_FILE);
+
+ @Before
+ public void setup() throws Exception {
+ WaitFor.services(teleporter, SlingRepository.class, RepoInitParser.class);
+ session = teleporter.getService(SlingRepository.class).loginAdministrative(null);
+
+ // Execute some repoinit statements
+ final InputStream is = getClass().getResourceAsStream(REPO_INIT_FILE);
+ assertNotNull("Expecting " + REPO_INIT_FILE, is);
+ try {
+ final RepoInitParser parser = teleporter.getService(RepoInitParser.class);
+ final OperationVisitor v = new JcrRepoInitOpVisitor(session);
+ for(Operation op : parser.parse(new InputStreamReader(is, "UTF-8"))) {
+ op.accept(v);
+ }
+ session.save();
+ } finally {
+ is.close();
+ }
+
+ // The repoinit file causes those nodes to be created
+ assertTrue("Expecting test nodes to be created", session.itemExists("/acltest/A/B"));
+ }
+
+ @After
+ public void cleanup() {
+ if(session != null) {
+ session.logout();
+ }
+ }
+
+ private boolean userExists(String id) throws LoginException, RepositoryException, InterruptedException {
+ final Authorizable a = ((JackrabbitSession)session).getUserManager().getAuthorizable(id);
+ return a != null;
+ }
+
+ private Session getServiceSession(String serviceId) throws LoginException, RepositoryException {
+ return session.impersonate(new SimpleCredentials(serviceId, new char[0]));
+ }
+
+ /** True if user can write to specified path.
+ * @throws PathNotFoundException if the path doesn't exist */
+ private boolean canWrite(String userId, String path) throws PathNotFoundException,RepositoryException {
+ if(!session.itemExists(path)) {
+ throw new PathNotFoundException(path);
+ }
+
+ final Session serviceSession = getServiceSession(userId);
+ final String testNodeName = "test_" + UUID.randomUUID().toString();
+ try {
+ ((Node)serviceSession.getItem(path)).addNode(testNodeName);
+ serviceSession.save();
+ } catch(AccessDeniedException ade) {
+ return false;
+ } finally {
+ serviceSession.logout();
+ }
+ return true;
+ }
+
+ @Test
+ public void serviceUserCreated() throws Exception {
+ new Retry() {
+ @Override
+ public Void call() throws Exception {
+ assertTrue("Expecting user " + FRED_WILMA, userExists(FRED_WILMA));
+ return null;
+ }
+ };
+ }
+
+ @Test
+ public void fredWilmaAcl() throws Exception {
+ new Retry() {
+ @Override
+ public Void call() throws Exception {
+ assertFalse("Expecting no write access to A", canWrite(FRED_WILMA, "/acltest/A"));
+ assertTrue("Expecting write access to A/B", canWrite(FRED_WILMA, "/acltest/A/B"));
+ return null;
+ }
+ };
+ }
+
+ @Test
+ public void anotherUserAcl() throws Exception {
+ new Retry() {
+ @Override
+ public Void call() throws Exception {
+ assertTrue("Expecting write access to A", canWrite(ANOTHER, "/acltest/A"));
+ assertFalse("Expecting no write access to B", canWrite(ANOTHER, "/acltest/A/B"));
+ return null;
+ }
+ };
+ }
+}
diff --git a/src/test/java/org/apache/sling/repoinit/it/Retry.java b/src/test/java/org/apache/sling/repoinit/it/Retry.java
new file mode 100644
index 0000000..65f7f8e
--- /dev/null
+++ b/src/test/java/org/apache/sling/repoinit/it/Retry.java
@@ -0,0 +1,55 @@
+/*
+ * 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.repoinit.it;
+
+import static org.junit.Assert.fail;
+import java.util.concurrent.Callable;
+
+/** RetryRule does not seem to work for teleported tests */
+public abstract class Retry implements Callable<Void> {
+ public static final int DEFAULT_INTERVAL = 100;
+ public static final int DEFAULT_TIMEOUT = 10000;
+
+ public Retry() throws Exception {
+ this(DEFAULT_TIMEOUT, DEFAULT_INTERVAL);
+ }
+
+ public Retry(int timeout, int interval) {
+ final long endTime = System.currentTimeMillis() + timeout;
+ Throwable failure = null;
+ while(System.currentTimeMillis() < endTime) {
+ try {
+ failure = null;
+ call();
+ break;
+ } catch(Throwable t) {
+ failure = t;
+ try {
+ Thread.sleep(interval);
+ } catch(InterruptedException ignore) {
+ }
+ }
+ }
+ if(failure != null) {
+ if(failure instanceof AssertionError) {
+ throw (AssertionError)failure;
+ }
+ fail("Failed with timeout:" + failure.toString());
+ }
+ }
+}
diff --git a/src/test/java/org/apache/sling/repoinit/it/WaitFor.java b/src/test/java/org/apache/sling/repoinit/it/WaitFor.java
new file mode 100644
index 0000000..60d2b81
--- /dev/null
+++ b/src/test/java/org/apache/sling/repoinit/it/WaitFor.java
@@ -0,0 +1,50 @@
+/*
+ * 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.repoinit.it;
+
+import static org.junit.Assert.fail;
+
+import org.apache.sling.junit.rules.TeleporterRule;
+import org.apache.sling.testing.tools.sling.TimeoutsProvider;
+
+public class WaitFor {
+ /** Block until the specified set of serviceClasss are present, or timeout */
+ public static void services(TeleporterRule teleporter, Class <?> ... serviceClasses) {
+ for(Class<?> serviceClass : serviceClasses) {
+ service(teleporter, serviceClass);
+ }
+ }
+
+ /** Block until the specified serviceClass is present, or timeout */
+ public static void service(TeleporterRule teleporter, Class <?> serviceClass) {
+ final long timeout = System.currentTimeMillis() + TimeoutsProvider.getInstance().getTimeout(10000);
+ while(System.currentTimeMillis() < timeout) {
+ try {
+ if(teleporter.getService(serviceClass) != null) {
+ return;
+ }
+ } catch(IllegalStateException ignore) {
+ }
+
+ try {
+ Thread.sleep(50L);
+ } catch(InterruptedException ignore) {
+ }
+ }
+ fail("Timeout waiting for serviceClass " + serviceClass.getName());
+ }
+}
diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml
new file mode 100644
index 0000000..a28514c
--- /dev/null
+++ b/src/test/resources/logback-test.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
+<configuration>
+
+ <appender name="file" class="ch.qos.logback.core.FileAppender">
+ <file>target/sling-tests.log</file>
+ <encoder>
+ <pattern>%date{HH:mm:ss.SSS} %-5level %-40([%thread] %F:%L) %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="sift" class="ch.qos.logback.classic.sift.SiftingAppender">
+ <discriminator>
+ <Key>testclass</Key>
+ <DefaultValue>junit</DefaultValue>
+ </discriminator>
+ <sift>
+ <appender name="FILE-${testname}" class="ch.qos.logback.core.FileAppender">
+ <File>target/surefire-reports/${testclass}.log</File>
+ <layout class="ch.qos.logback.classic.PatternLayout">
+ <Pattern>%date{HH:mm:ss.SSS} %-5level %-40([%thread] %F:%L) %msg%n</Pattern>
+ </layout>
+ </appender>
+ </sift>
+ </appender>
+
+ <logger name="org.apache.sling.launchpad" level="DEBUG" />
+
+ <root level="INFO">
+ <appender-ref ref="file" />
+ <appender-ref ref="sift" />
+ </root>
+
+</configuration>
diff --git a/src/test/resources/repoinit.txt b/src/test/resources/repoinit.txt
new file mode 100644
index 0000000..de2286a
--- /dev/null
+++ b/src/test/resources/repoinit.txt
@@ -0,0 +1,43 @@
+#
+# 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.
+#
+
+# Paths on which ACLs will be set
+create path /acltest/A/B
+
+# Service users and ACLs for our integration tests
+create service user fredWilmaService
+create service user anotherService
+
+# ACLs for those service users
+set ACL for fredWilmaService
+ allow jcr:all on /acltest
+ deny jcr:write on /acltest/A
+end
+
+set ACL for fredWilmaService
+ allow jcr:write on /acltest/A/B
+end
+
+set ACL on /acltest
+ allow jcr:all for anotherService
+end
+
+set ACL on /acltest/A/B
+ deny jcr:write for anotherService
+end
--
To stop receiving notification emails like this one, please contact
rombert@apache.org.