Search in sources :

Example 1 with Configuration

use of org.ops4j.pax.exam.Configuration in project jetty.project by eclipse.

the class TestJettyOSGiBootCore method config.

@Configuration
public Option[] config() {
    VersionResolver resolver = MavenUtils.asInProject();
    ArrayList<Option> options = new ArrayList<Option>();
    options.addAll(provisionCoreJetty());
    options.add(CoreOptions.junitBundles());
    options.addAll(httpServiceJetty());
    options.addAll(Arrays.asList(options(systemProperty("pax.exam.logging").value("none"))));
    options.addAll(Arrays.asList(options(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(LOG_LEVEL))));
    options.addAll(Arrays.asList(options(systemProperty("org.eclipse.jetty.LEVEL").value(LOG_LEVEL))));
    options.addAll(Arrays.asList(options(systemProperty("org.eclipse.jetty.annotations.LEVEL").value("DEBUG"))));
    return options.toArray(new Option[options.size()]);
}
Also used : VersionResolver(org.ops4j.pax.exam.options.MavenUrlReference.VersionResolver) ArrayList(java.util.ArrayList) Option(org.ops4j.pax.exam.Option) Configuration(org.ops4j.pax.exam.Configuration)

Example 2 with Configuration

use of org.ops4j.pax.exam.Configuration in project aries by apache.

the class FragmentTest method configuration.

@Configuration
public Option[] configuration() {
    InputStream hostJar = TinyBundles.bundle().set(Constants.BUNDLE_MANIFESTVERSION, "2").set(Constants.BUNDLE_SYMBOLICNAME, "org.apache.aries.test.host").build();
    InputStream fragmentJar = TinyBundles.bundle().set(Constants.BUNDLE_MANIFESTVERSION, "2").set(Constants.BUNDLE_SYMBOLICNAME, "org.apache.aries.test.fragment").set(Constants.FRAGMENT_HOST, "org.apache.aries.test.host").add("OSGI-INF/blueprint/bp.xml", this.getClass().getResourceAsStream("/bp.xml")).build();
    return new Option[] { baseOptions(), Helper.blueprintBundles(), streamBundle(fragmentJar).noStart(), streamBundle(hostJar), mvnBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample", false) };
}
Also used : InputStream(java.io.InputStream) Option(org.ops4j.pax.exam.Option) Configuration(org.ops4j.pax.exam.Configuration)

Example 3 with Configuration

use of org.ops4j.pax.exam.Configuration in project aries by apache.

the class AbstractTransactionTest method localEmbeddedH2LocalTxConfiguration.

@Configuration
public Option[] localEmbeddedH2LocalTxConfiguration() {
    String localRepo = System.getProperty("maven.repo.local");
    if (localRepo == null) {
        localRepo = System.getProperty("org.ops4j.pax.url.mvn.localRepository");
    }
    Option testSpecificOptions = testSpecificOptions();
    return options(junitBundles(), systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"), when(localRepo != null).useOptions(CoreOptions.vmOption("-Dorg.ops4j.pax.url.mvn.localRepository=" + localRepo)), localTxControlService(), localJdbcResourceProviderWithH2(), when(testSpecificOptions != null).useOptions(testSpecificOptions), mavenBundle("org.ops4j.pax.logging", "pax-logging-api").versionAsInProject(), mavenBundle("org.ops4j.pax.logging", "pax-logging-service").versionAsInProject());
}
Also used : Option(org.ops4j.pax.exam.Option) Configuration(org.ops4j.pax.exam.Configuration)

Example 4 with Configuration

use of org.ops4j.pax.exam.Configuration in project aries by apache.

the class IntegrationTestBase method configuration.

@Configuration
public static Option[] configuration() {
    final String bundleFileName = System.getProperty(BUNDLE_JAR_SYS_PROP, BUNDLE_JAR_DEFAULT);
    final File bundleFile = new File(bundleFileName);
    if (!bundleFile.canRead()) {
        throw new IllegalArgumentException("Cannot read from bundle file " + bundleFileName + " specified in the " + BUNDLE_JAR_SYS_PROP + " system property");
    }
    final Option[] options = options(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"), junitBundles(), bundle(bundleFile.toURI().toString()), mavenBundle("org.ops4j.pax.tinybundles", "tinybundles", "2.0.0"), mavenBundle("org.apache.felix", "org.apache.felix.configadmin", "1.2.8"), mavenBundle("org.ops4j.pax.logging", "pax-logging-api", "1.7.2"), mavenBundle("org.ops4j.pax.logging", "pax-logging-service", "1.7.2"));
    return options;
}
Also used : Option(org.ops4j.pax.exam.Option) File(java.io.File) Configuration(org.ops4j.pax.exam.Configuration)

Example 5 with Configuration

use of org.ops4j.pax.exam.Configuration in project aries by apache.

the class SubsystemTest method configuration.

@Configuration
public Option[] configuration() throws Exception {
    new File("target").mkdirs();
    init();
    return new Option[] { baseOptions(), systemProperty("org.osgi.framework.bsnversion").value("multiple"), systemProperty("org.osgi.framework.storage.clean").value("onFirstInit"), // Bundles
    mavenBundle("org.apache.aries", "org.apache.aries.util").versionAsInProject(), mavenBundle("org.apache.aries.application", "org.apache.aries.application.utils").versionAsInProject(), mavenBundle("org.apache.aries.application", "org.apache.aries.application.api").versionAsInProject(), when(installModeler).useOptions(modelerBundles()), when(installConfigAdmin).useOptions(mavenBundle("org.apache.felix", "org.apache.felix.configadmin").versionAsInProject()), mavenBundle("org.apache.aries.subsystem", "org.apache.aries.subsystem.api").versionAsInProject(), mavenBundle("org.apache.aries.subsystem", SUBSYSTEM_CORE_NAME).versionAsInProject(), streamBundle(createCoreFragment()).noStart(), mavenBundle("org.apache.aries.subsystem", "org.apache.aries.subsystem.itest.interfaces").versionAsInProject(), mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit").versionAsInProject(), //mavenBundle("org.apache.felix",             "org.apache.felix.resolver").versionAsInProject(),
    mavenBundle("org.eclipse.equinox", "org.eclipse.equinox.coordinator").version("1.1.0.v20120522-1841"), mavenBundle("org.eclipse.equinox", "org.eclipse.equinox.event").versionAsInProject(), mavenBundle("org.eclipse.equinox", "org.eclipse.equinox.region").version("1.1.0.v20120522-1841"), mavenBundle("org.osgi", "org.osgi.enterprise").versionAsInProject(), mavenBundle("org.easymock", "easymock").versionAsInProject(), mavenBundle("org.ops4j.pax.logging", "pax-logging-api").versionAsInProject(), mavenBundle("org.ops4j.pax.logging", "pax-logging-service").versionAsInProject(), mavenBundle("org.ops4j.pax.tinybundles", "tinybundles").versionAsInProject(), mavenBundle("biz.aQute.bnd", "bndlib").versionAsInProject(), mavenBundle("org.apache.aries.subsystem", "org.apache.aries.subsystem.obr").versionAsInProject(), mavenBundle("org.apache.felix", "org.apache.felix.bundlerepository").versionAsInProject() };
}
Also used : Option(org.ops4j.pax.exam.Option) CoreOptions.vmOption(org.ops4j.pax.exam.CoreOptions.vmOption) File(java.io.File) Configuration(org.ops4j.pax.exam.Configuration)

Aggregations

Configuration (org.ops4j.pax.exam.Configuration)24 Option (org.ops4j.pax.exam.Option)17 File (java.io.File)11 InputStream (java.io.InputStream)4 ArrayList (java.util.ArrayList)2 KarafDistributionOption.karafDistributionConfiguration (org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration)2 IOException (java.io.IOException)1 URL (java.net.URL)1 Path (java.nio.file.Path)1 StandardCopyOption (java.nio.file.StandardCopyOption)1 Properties (java.util.Properties)1 JobManagerConfiguration (org.apache.sling.event.impl.jobs.config.JobManagerConfiguration)1 CoreOptions.vmOption (org.ops4j.pax.exam.CoreOptions.vmOption)1 KarafDistributionOption (org.ops4j.pax.exam.karaf.options.KarafDistributionOption)1 KarafDistributionOption.debugConfiguration (org.ops4j.pax.exam.karaf.options.KarafDistributionOption.debugConfiguration)1 KarafDistributionOption.replaceConfigurationFile (org.ops4j.pax.exam.karaf.options.KarafDistributionOption.replaceConfigurationFile)1 MavenArtifactUrlReference (org.ops4j.pax.exam.options.MavenArtifactUrlReference)1 VersionResolver (org.ops4j.pax.exam.options.MavenUrlReference.VersionResolver)1