SLING-7454 - disable this module, tests have moved elsewhere
diff --git a/.sling-module.xml b/.sling-module.xml
new file mode 100644
index 0000000..452f6a6
--- /dev/null
+++ b/.sling-module.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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-module>
+ <jenkins>
+ <enabled>false</enabled>
+ </jenkins>
+</sling-module>
diff --git a/README.md b/README.md
index 2dcc5e0..5bc70fa 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,6 @@
# Apache Sling RepoInit Integration Tests
This module is part of the [Apache Sling](https://sling.apache.org) project.
+
+These tests have moved elsewhere, see DISABLED - these tests have moved elsewhere,
+see [SLING-7454](https://issues.apache.org/jira/browse/SLING-7454).
diff --git a/pom.xml b/pom.xml
index c22a0c7..948366c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,11 +28,11 @@
</parent>
<artifactId>org.apache.sling.repoinit.it</artifactId>
- <packaging>slingstart</packaging>
- <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <version>0.0.2-SNAPSHOT</version>
<name>Apache Sling RepoInit Integration Tests</name>
<description>
- Integration tests for the RepoInit modules
+ DISABLED - these tests have moved elsewhere, see SLING-7454
</description>
<scm>
@@ -40,165 +40,4 @@
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-repoinit-it.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-repoinit-it.git</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>
-
- <!--
- If set to "true" this will start the launchpad with standard debug options,
- or set to a string to provide custom debug settings
- See slingstart-maven-plugin for more options (keep launchpad running etc)
- -->
- <launchpad.debug/>
- </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.7.0</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>${launchpad.debug}</debug>
- </server>
- </servers>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.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>
- </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.8</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/boot.txt b/src/main/provisioning/boot.txt
deleted file mode 100644
index a7050a1..0000000
--- a/src/main/provisioning/boot.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# 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.
-#
-# The :boot feature contains all things to bootstrap the installation.
-#
-[feature name=:boot]
-
-# additional entries for sling.properties
-# ---------------------------------------
-# oak_tar and oak_mongo run modes are mutually exclusive,
-# and cannot be changed after the first startup
-[settings]
- sling.run.mode.install.options=oak_tar,oak_mongo
-
-[artifacts]
- org.slf4j/slf4j-api/1.7.6
- org.apache.sling/org.apache.sling.commons.log/4.0.6
- org.apache.sling/org.apache.sling.commons.logservice/1.0.6
- org.slf4j/jcl-over-slf4j/1.7.6
- org.slf4j/log4j-over-slf4j/1.7.6
- org.apache.sling/org.apache.sling.settings/1.3.8
- org.apache.sling/org.apache.sling.fragment.xml/1.0.2
- org.apache.sling/org.apache.sling.fragment.transaction/1.0.0
- org.apache.sling/org.apache.sling.javax.activation/0.1.0
- org.apache.sling/org.apache.sling.fragment.ws/1.0.2
- org.apache.sling/org.apache.sling.launchpad.installer/1.2.2
- org.apache.sling/org.apache.sling.installer.core/3.6.8
- org.apache.sling/org.apache.sling.installer.provider.file/1.1.0
- org.apache.sling/org.apache.sling.installer.factory.configuration/1.1.2
- org.apache.felix/org.apache.felix.configadmin/1.8.8
- org.apache.felix/org.apache.felix.eventadmin/1.4.4
\ No newline at end of file
diff --git a/src/main/provisioning/launchpad.txt b/src/main/provisioning/launchpad.txt
deleted file mode 100644
index 27158a9..0000000
--- a/src/main/provisioning/launchpad.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# 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.
-#
-# The :launchpad feature defines Sling's launchpad version
-# Only a single artifact is allowed within this feature.
-#
-[feature name=:launchpad]
- org.apache.sling/org.apache.sling.launchpad.base/5.4.0-2.6.10
diff --git a/src/main/provisioning/oak.txt b/src/main/provisioning/oak.txt
deleted file mode 100644
index c223272..0000000
--- a/src/main/provisioning/oak.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# 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.
-#
-# This is the OAK feature.
-[feature name=oak]
-
-[variables]
- oak.version=1.6.1
-
-# The segment node store is used via a configuration
-[artifacts startLevel=10]
- org.apache.felix/org.apache.felix.jaas/0.0.4
-
-[artifacts startLevel=15]
- org.apache.jackrabbit/oak-core/${oak.version}
- org.apache.jackrabbit/oak-commons/${oak.version}
- org.apache.jackrabbit/oak-lucene/${oak.version}
- org.apache.jackrabbit/oak-blob/${oak.version}
- org.apache.jackrabbit/oak-jcr/${oak.version}
-
-[artifacts startLevel=15 runModes=oak_tar]
- org.apache.jackrabbit/oak-segment/${oak.version}
-
-# start the Oak server instance after all components have been configured
-# and started to avoid restarting that component ( see SLING-4556 )
-[artifacts startLevel=16]
- # TODO replace with 1.0.2 once that's released
- org.apache.sling/org.apache.sling.jcr.oak.server/1.1.4
-
-[configurations]
- org.apache.felix.jaas.Configuration.factory-LoginModuleImpl
- jaas.controlFlag="required"
- jaas.classname="org.apache.jackrabbit.oak.security.authentication.user.LoginModuleImpl"
-
- org.apache.felix.jaas.ConfigurationSpi
- jaas.defaultRealmName="jackrabbit.oak"
- jaas.configProviderName="FelixJaasProvider"
-
- org.apache.jackrabbit.oak.security.authentication.AuthenticationConfigurationImpl
- org.apache.jackrabbit.oak.authentication.configSpiName="FelixJaasProvider"
-
- org.apache.jackrabbit.oak.security.user.UserConfigurationImpl
- groupsPath="/home/groups"
- usersPath="/home/users"
- defaultDepth="1"
- importBehavior="besteffort"
-
- org.apache.jackrabbit.oak.spi.security.user.action.DefaultAuthorizableActionProvider
- enabledActions=["org.apache.jackrabbit.oak.spi.security.user.action.AccessControlAction"]
- userPrivilegeNames=["jcr:all"]
- groupPrivilegeNames=["jcr:read"]
-
-[configurations runModes=oak_tar]
- org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService
- name="Default\ NodeStore"
- repository.home="sling/repository"
diff --git a/src/main/provisioning/repoinit.txt b/src/main/provisioning/repoinit.txt
deleted file mode 100644
index e9461b6..0000000
--- a/src/main/provisioning/repoinit.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-#
-# 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=repoinit-tests]
-
-[artifacts startLevel=2]
- org.apache.sling/org.apache.sling.jcr.repoinit/1.1.7-SNAPSHOT
- org.apache.sling/org.apache.sling.repoinit.parser/1.2.1-SNAPSHOT
- org.apache.sling/org.apache.sling.provisioning.model/1.8.2
-
-[artifacts]
- org.apache.sling/org.apache.sling.junit.core/1.0.18
- org.apache.sling/org.apache.sling.testing.tools/1.0.10
-
-[settings]
- org.apache.sling.commons.log.julenabled=true
-
-[configurations]
- org.apache.sling.jcr.repoinit.impl.RepositoryInitializer
- references=["model:context:/resources/provisioning/model.txt","model@repoinitTwo:context:/resources/provisioning/model.txt"]
-
-[:repoinit]
-# Test the RepositoryInitializer which reads such sections
-create path /repoinit/fromProvisioningModel
-
-create service user userFromProvisioningModel
-
-set ACL for userFromProvisioningModel
- allow jcr:read on /repoinit/fromProvisioningModel
- deny jcr:write on /repoinit/fromProvisioningModel
-end
-
-create service user thirdUserFromProvisioningModel
-disable service user thirdUserFromProvisioningModel : "Disabled for testing reason"
-
-register namespace (slingtest) http://sling.apache.org/ns/test/repoinit-it/v1.0
-
-register nodetypes
-<<===
-<< <slingtest='http://sling.apache.org/ns/test/repoinit-it/v1.0'>
-<< [slingtest:unstructured] > nt:unstructured
-===>>
-
-# second section to test multiple configured URLs
-[:repoinitTwo]
-create service user secondUserFromProvisioningModel
diff --git a/src/main/provisioning/sling.txt b/src/main/provisioning/sling.txt
deleted file mode 100644
index f0ea054..0000000
--- a/src/main/provisioning/sling.txt
+++ /dev/null
@@ -1,110 +0,0 @@
-#
-# 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.
-#
-# The feature for Apache Sling
-[feature name=sling]
-
-[variables]
- jackrabbit.version=2.14.0
-
-[artifacts]
- commons-collections/commons-collections/3.2.2
- org.apache.commons/commons-collections4/4.1
- commons-codec/commons-codec/1.9
- commons-lang/commons-lang/2.6
- org.apache.commons/commons-lang3/3.4
- org.apache.commons/commons-math/2.2
- org.apache.geronimo.bundles/commons-httpclient/3.1_1
- org.apache.httpcomponents/httpcore-osgi/4.4.1
- org.apache.httpcomponents/httpclient-osgi/4.4.1
- com.google.guava/guava/15.0
- org.apache.sling/org.apache.sling.adapter/2.1.6
- org.apache.sling/org.apache.sling.api/2.11.0
- org.apache.sling/org.apache.sling.auth.core/1.3.14
- org.apache.sling/org.apache.sling.auth.form/1.0.8
- org.apache.sling/org.apache.sling.commons.classloader/1.3.2
- org.apache.sling/org.apache.sling.commons.compiler/2.3.0
- org.apache.sling/org.apache.sling.commons.mime/2.1.8
- org.apache.sling/org.apache.sling.commons.osgi/2.4.0
- org.apache.sling/org.apache.sling.commons.scheduler/2.4.14
- org.apache.sling/org.apache.sling.commons.threads/3.2.4
- org.apache.sling/org.apache.sling.engine/2.4.6
- org.apache.sling/org.apache.sling.jcr.resource/2.7.4
- org.apache.sling/org.apache.sling.resourceresolver/1.4.12
- org.apache.sling/org.apache.sling.scripting.api/2.1.8
- org.apache.sling/org.apache.sling.scripting.core/2.0.36
- org.apache.sling/org.apache.sling.serviceusermapper/1.3.4
- org.apache.sling/org.apache.sling.servlets.get/2.1.14
- org.apache.sling/org.apache.sling.servlets.resolver/2.4.2
- javax.mail/mail/1.4.7
- org.apache.felix/org.apache.felix.http.whiteboard/3.0.0
-
-[artifacts startLevel=5]
- org.apache.sling/org.apache.sling.extensions.webconsolesecurityprovider/1.0.0
- org.apache.felix/org.apache.felix.webconsole/4.2.14
- org.apache.geronimo.bundles/json/20090211_1
- org.apache.sling/org.apache.sling.commons.json/2.0.16
- commons-io/commons-io/2.4
- commons-fileupload/commons-fileupload/1.3.1
-
-[artifacts startLevel=10]
- org.apache.felix/org.apache.felix.scr/2.0.2
- org.apache.felix/org.apache.felix.metatype/1.1.2
- org.apache.tika/tika-core/1.11
- org.apache.tika/tika-bundle/1.11
-
-[artifacts startLevel=15]
- org.apache.sling/org.apache.sling.jcr.jcr-wrapper/2.0.0
- org.apache.sling/org.apache.sling.jcr.api/2.4.0
- org.apache.sling/org.apache.sling.jcr.base/3.0.4
- org.apache.sling/org.apache.sling.jcr.registration/1.0.2
- org.apache.jackrabbit/jackrabbit-api/${jackrabbit.version}
- org.apache.jackrabbit/jackrabbit-jcr-commons/${jackrabbit.version}
- org.apache.jackrabbit/jackrabbit-spi/${jackrabbit.version}
- org.apache.jackrabbit/jackrabbit-spi-commons/${jackrabbit.version}
- org.apache.jackrabbit/jackrabbit-webdav/${jackrabbit.version}
- org.apache.jackrabbit/jackrabbit-jcr-rmi/${jackrabbit.version}
- org.apache.jackrabbit/jackrabbit-data/${jackrabbit.version}
-
-[configurations]
- org.apache.sling.commons.log.LogManager
- org.apache.sling.commons.log.pattern="%d{dd.MM.yyyy HH:mm:ss.SSS}\ *%level*\ [%thread]\ %logger\ %msg%n"
- org.apache.sling.commons.log.file="logs/error.log"
- org.apache.sling.commons.log.level="info"
- org.apache.sling.commons.log.file.size="'.'yyyy-MM-dd"
- org.apache.sling.commons.log.file.number=I"7"
-
- org.apache.sling.jcr.base.internal.LoginAdminWhitelist.fragment-sling
- whitelist.name="sling"
- whitelist.bundles=[
- "org.apache.sling.junit.core",\
- "org.apache.sling.discovery.commons",\
- "org.apache.sling.discovery.base",\
- "org.apache.sling.discovery.oak",\
- "org.apache.sling.extensions.webconsolesecurityprovider",\
- "org.apache.sling.i18n",\
- "org.apache.sling.jcr.base",\
- "org.apache.sling.jcr.contentloader",\
- "org.apache.sling.jcr.davex",\
- "org.apache.sling.jcr.jackrabbit.usermanager",\
- "org.apache.sling.jcr.oak.server",\
- "org.apache.sling.jcr.repoinit",\
- "org.apache.sling.jcr.resource",\
- "org.apache.sling.jcr.webconsole",\
- "org.apache.sling.servlets.post"
- ]
diff --git a/src/main/provisioning/standalone.txt b/src/main/provisioning/standalone.txt
deleted file mode 100644
index 06aace4..0000000
--- a/src/main/provisioning/standalone.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# 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.
-#
-# The :standalone feature contains artifacts for the standalone jar
-#
-[feature name=standalone]
-
-# Add a servlet implementation for the standalone case
-[artifacts startLevel=5 runModes=:standalone]
- org.apache.felix/org.apache.felix.http.servlet-api/1.1.2
- org.apache.felix/org.apache.felix.http.jetty/3.1.4
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
deleted file mode 100644
index 668eda9..0000000
--- a/src/test/java/org/apache/sling/junit/teleporter/customizers/ITCustomizer.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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/ProvisioningModelIT.java b/src/test/java/org/apache/sling/repoinit/it/ProvisioningModelIT.java
deleted file mode 100644
index c640a6d..0000000
--- a/src/test/java/org/apache/sling/repoinit/it/ProvisioningModelIT.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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.assertTrue;
-
-import java.util.UUID;
-
-import javax.jcr.Session;
-
-import org.apache.sling.jcr.api.SlingRepository;
-import org.apache.sling.junit.rules.TeleporterRule;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-/** Test repoinit statements supplied by our provisioning model */
-public class ProvisioningModelIT {
-
- private Session session;
- private static final String TEST_PATH = "/repoinit/fromProvisioningModel";
- private static final String TEST_USER = "userFromProvisioningModel";
- private static final String SECOND_TEST_USER = "secondUserFromProvisioningModel";
- private static final String THIRD_TEST_USER = "thirdUserFromProvisioningModel";
- private final String uniqueID = UUID.randomUUID().toString();
-
- @Rule
- public TeleporterRule teleporter = TeleporterRule.forClass(getClass(), "IT");
-
- @Before
- public void setup() throws Exception {
- session = teleporter.getService(SlingRepository.class).loginAdministrative(null);
- }
-
- @After
- public void cleanup() {
- if(session != null) {
- session.logout();
- }
- }
-
- @Test
- public void usersCreated() throws Exception {
- assertTrue("Expecting user " + TEST_USER, U.userExists(session, TEST_USER));
- assertTrue("Expecting user " + SECOND_TEST_USER, U.userExists(session, SECOND_TEST_USER));
- assertTrue("Expecting user " + THIRD_TEST_USER, U.userExists(session, THIRD_TEST_USER));
- }
-
- @Test
- public void userDisabled() throws Exception {
- assertTrue(String.format("Expecting user %s to be disabled", THIRD_TEST_USER), U.userIsDisabled(session, THIRD_TEST_USER));
- assertFalse(String.format("Expecting user %s to be enabled", TEST_USER), U.userIsDisabled(session,TEST_USER));
- }
-
- @Test
- public void userAclSet() throws Exception {
- assertTrue("Expecting read access", U.canRead(session, TEST_USER, TEST_PATH));
- assertFalse("Expecting no write access", U.canWrite(session, TEST_USER, TEST_PATH));
- }
-
- @Test
- public void namespaceAndCndRegistered() throws Exception {
- final String nodeName = "ns-" + uniqueID;
- session.getRootNode().addNode(nodeName, "slingtest:unstructured");
- session.save();
- }
-}
diff --git a/src/test/java/org/apache/sling/repoinit/it/RepoInitIT.java b/src/test/java/org/apache/sling/repoinit/it/RepoInitIT.java
deleted file mode 100644
index 2a49fbb..0000000
--- a/src/test/java/org/apache/sling/repoinit/it/RepoInitIT.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * 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 javax.jcr.Session;
-
-import org.apache.sling.jcr.api.SlingRepository;
-import org.apache.sling.jcr.repoinit.JcrRepoInitOpsProcessor;
-import org.apache.sling.junit.rules.TeleporterRule;
-import org.apache.sling.repoinit.parser.RepoInitParser;
-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 {
- 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 JcrRepoInitOpsProcessor processor = teleporter.getService(JcrRepoInitOpsProcessor.class);
- processor.apply(session, parser.parse(new InputStreamReader(is, "UTF-8")));
- 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();
- }
- }
-
- @Test
- public void serviceUserCreated() throws Exception {
- new Retry() {
- @Override
- public Void call() throws Exception {
- assertTrue("Expecting user " + FRED_WILMA, U.userExists(session, 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", U.canWrite(session, FRED_WILMA, "/acltest/A"));
- assertTrue("Expecting write access to A/B", U.canWrite(session, 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", U.canWrite(session, ANOTHER, "/acltest/A"));
- assertFalse("Expecting no write access to B", U.canWrite(session, 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
deleted file mode 100644
index 65f7f8e..0000000
--- a/src/test/java/org/apache/sling/repoinit/it/Retry.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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/U.java b/src/test/java/org/apache/sling/repoinit/it/U.java
deleted file mode 100644
index d5b91f1..0000000
--- a/src/test/java/org/apache/sling/repoinit/it/U.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * 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 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.jackrabbit.api.security.user.User;
-
-/** Test utilities */
-public class U {
- public static boolean userExists(Session session, String id) throws LoginException, RepositoryException, InterruptedException {
- final Authorizable a = ((JackrabbitSession)session).getUserManager().getAuthorizable(id);
- return a != null;
- }
-
- public static boolean userIsDisabled(Session session, String id) throws RepositoryException {
- final Authorizable a = ((JackrabbitSession)session).getUserManager().getAuthorizable(id);
- if (a == null) {
- throw new IllegalStateException("Authorizable not found:" + id);
- }
- if (a.isGroup()) {
- throw new IllegalStateException("Authorizable is a group:" + id);
- }
- return ((User)a).isDisabled();
- }
-
- public static Session getServiceSession(Session session, 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 */
- public static boolean canWrite(Session session, String userId, String path) throws PathNotFoundException,RepositoryException {
- if(!session.itemExists(path)) {
- throw new PathNotFoundException(path);
- }
-
- final Session serviceSession = getServiceSession(session, 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;
- }
-
- /** True if user can read specified path.
- * @throws PathNotFoundException if the path doesn't exist */
- public static boolean canRead(Session session, String userId, String path) throws PathNotFoundException,RepositoryException {
- if(!session.itemExists(path)) {
- throw new PathNotFoundException(path);
- }
-
- final Session serviceSession = getServiceSession(session, userId);
- try {
- serviceSession.getItem(path);
- } catch(AccessDeniedException ade) {
- return false;
- } finally {
- serviceSession.logout();
- }
- return true;
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml
deleted file mode 100644
index a28514c..0000000
--- a/src/test/resources/logback-test.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?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
deleted file mode 100644
index de2286a..0000000
--- a/src/test/resources/repoinit.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# 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