blob: 0b73fa8e1f98dbe9c907f1d0e6f1dfff2314a27b [file] [log] [blame]
# Test the crankstart launcher by setting up an HTTP
# server with a few servlets that require specific OSGi configurations
# Default values for our variables
defaults single.path /single
# Bootstrap classpath (variables are not supported here)
classpath mvn:org.apache.felix/org.apache.felix.framework/4.4.0
classpath mvn:org.slf4j/slf4j-api/1.6.2
classpath mvn:org.slf4j/slf4j-simple/1.6.2
classpath mvn:org.apache.sling/org.apache.sling.crankstart.core/1.0.1-SNAPSHOT
classpath mvn:org.apache.sling/org.apache.sling.crankstart.api/1.0.1-SNAPSHOT
classpath mvn:org.apache.sling/org.apache.sling.provisioning.model/1.1.0
# OSGi properties
osgi.property org.osgi.service.http.port ${http.port}
osgi.property org.osgi.framework.storage ${osgi.storage.path}
# Start the framework. Crankstart file processing will stop here
# if this is not the first startup.
start.framework
# The crankstart.api.fragment bundle makes the crankstart.api package available
# to bundles, required for bundles to provide crankstart extension commands like
# the test.system.property command below
bundle mvn:org.apache.sling/org.apache.sling.crankstart.api.fragment/1.0.3-SNAPSHOT
bundle mvn:org.apache.sling/org.apache.sling.crankstart.test.services/1.0.1-SNAPSHOT
# Add provisioning model artifacts
# TODO move all bundles there
provisioning.model src/test/resources/provisioning-model
# Now start our bundles
start.all.bundles
# OSGi configs that activate our test servlets
config org.apache.sling.crankstart.testservices.SingleConfigServlet
path=${single.path}
message=doesn't matter
config.factory org.apache.sling.crankstart.testservices.ConfigFactoryServlet
CRANKSTART_CONFIG_ID=some.unique.ID
path=/foo
message=Not used
config.factory org.apache.sling.crankstart.testservices.ConfigFactoryServlet
path=/bar/test
message=Not used
# Test Felix format configs
config felix.format.test FORMAT:felix.config
mongouri="mongodb://localhost:27017"
service.ranking.launcher.test=I"54321"
array=["foo","bar.from.launcher.test"]
config empty.config.should.work FORMAT:felix.config
# Test an extension command provided by our test-services bundle
test.system.property the.test.system.property was set by test-services bundle
# Prepare additional resources for the Sling installer
sling.installer.resource mvn:org.apache.sling/org.apache.sling.junit.core/1.0.8
sling.installer.resource mvn:org.apache.sling/org.apache.sling.commons.mime/2.1.4
sling.installer.resource mvn:org.apache.sling/org.apache.sling.settings/1.3.0
# And register the installer resources
sling.installer.register crankstart
# Informative log
log felix http service should come up at http://localhost:${http.port}