public abstract class DdfBaseOptions extends Object implements ApplicationOptions
Option
s required to run with Pax Exam. The class
must be extended to implement getDistributionOptions()
and provide the distribution that
will be run in the test container.
Any other bundles and features required by the tests can be provided by extending this class
and implementing getBundleOptions()
and getFeatureOptions()
. Other
configuration options can be provided by overwriting getExtraOptions()
.
The following system properties can be used to customize the application's runtime behavior:
logLevel
: sets logging to the level specified for all ddf
and org.codice.ddf
packages, unless logPackages
is also provided.
logPackages
: coma-separated list of packages logLevel
will apply to; ddf
and org.codice.ddf
if not provided.
KarafOptions
Modifier and Type | Field and Description |
---|---|
static String |
ROOT_CONTEXT
Root context value
|
static String |
SERVLET_CONTEXT_KEY
Servlet context system property key
|
Constructor and Description |
---|
DdfBaseOptions(PortFinder portFinder)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.ops4j.pax.exam.Option |
get()
Gets the Pax Exam configuration
Option s for this application. |
protected BundleOptionBuilder.BundleOption |
getBundleOptions()
Gets the
BundleOptionBuilder.BundleOption that contains all the bundles to start in the Pax Exam container
for the tests to run. |
protected String |
getDefaultLogPackages()
Gets the list of packages whose logging level will be changed when the
logLevel system
property has been defined. |
protected abstract org.ops4j.pax.exam.Option |
getDistributionOptions()
Gets the distribution artifact to deploy in the Pax Exam container, e.g., the Karaf or DDF
distribution zip file.
|
protected org.ops4j.pax.exam.Option |
getExtraOptions()
Gets the extra Pax Exam
Option to use to configure the Pax Exam container. |
protected FeatureOptionBuilder.FeatureOption |
getFeatureOptions()
Gets the
FeatureOptionBuilder.FeatureOption that contains all the features to start in the Pax Exam
container for the tests to run. |
public static final String SERVLET_CONTEXT_KEY
public static final String ROOT_CONTEXT
public DdfBaseOptions(PortFinder portFinder)
portFinder
- instance of the PortFinder
to use to assign unique ports to the new
Pax Exam containerpublic org.ops4j.pax.exam.Option get()
ApplicationOptions
Option
s for this application. Implementers should use
Pax Exam's CoreOptions.composite(Option...)
to combine multiple
options into one if needed.get
in interface Supplier<org.ops4j.pax.exam.Option>
get
in interface ApplicationOptions
Option
sprotected abstract org.ops4j.pax.exam.Option getDistributionOptions()
protected BundleOptionBuilder.BundleOption getBundleOptions()
BundleOptionBuilder.BundleOption
that contains all the bundles to start in the Pax Exam container
for the tests to run.
Important: Since the bundle being tested will automatically be started by this class, it should not be returned by this method.
BundleOptionBuilder.BundleOption
that contains the bundles to start. Defaults to an empty list of
bundles.protected FeatureOptionBuilder.FeatureOption getFeatureOptions()
FeatureOptionBuilder.FeatureOption
that contains all the features to start in the Pax Exam
container for the tests to run.FeatureOptionBuilder.FeatureOption
that contains the features to start. Defaults to an empty list of
features.protected org.ops4j.pax.exam.Option getExtraOptions()
Option
to use to configure the Pax Exam container. CoreOptions.composite(Option...)
can be used to combine multiple options
into one.Option
. Defaults to empty.protected String getDefaultLogPackages()
logLevel
system
property has been defined. By default, the ddf
and org.codice.ddf
packages will
have their logging level set to the one specified by logLevel
.ddf
and
org.codice.ddf
.This work is licensed under a Creative Commons Attribution 4.0 International License.