Search in sources :

Example 16 with Configuration

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

the class AbstractTransactionTest method localServerH2LocalTxConfiguration.

@Configuration
public Option[] localServerH2LocalTxConfiguration() {
    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(), systemProperty(REMOTE_DB_PROPERTY).value(getRemoteDBPath()), 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 17 with Configuration

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

the class AbstractTransactionTest method localConfigAdminDrivenH2LocalTxConfiguration.

@Configuration
public Option[] localConfigAdminDrivenH2LocalTxConfiguration() {
    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(), systemProperty(REMOTE_DB_PROPERTY).value(getRemoteDBPath()), mavenBundle("org.apache.felix", "org.apache.felix.configadmin").versionAsInProject(), systemProperty(CONFIGURED_PROVIDER_PROPERTY).value("local"), 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 18 with Configuration

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

the class AbstractTransactionTest method xaServerH2XATxConfiguration.

@Configuration
public Option[] xaServerH2XATxConfiguration() {
    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)), xaTxControlService(), xaJdbcResourceProviderWithH2(), systemProperty(REMOTE_DB_PROPERTY).value(getRemoteDBPath()), 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 19 with Configuration

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

the class AbstractTransactionTest method localConfigAdminDrivenH2XATxConfiguration.

@Configuration
public Option[] localConfigAdminDrivenH2XATxConfiguration() {
    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)), xaTxControlService(), localJdbcResourceProviderWithH2(), systemProperty(REMOTE_DB_PROPERTY).value(getRemoteDBPath()), mavenBundle("org.apache.felix", "org.apache.felix.configadmin").versionAsInProject(), systemProperty(CONFIGURED_PROVIDER_PROPERTY).value("local"), 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 20 with Configuration

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

the class FragmentTestBundleBlueprintAttribute method configuration.

@Configuration
public Option[] configuration() {
    InputStream hostJar = TinyBundles.bundle().set(Constants.BUNDLE_MANIFESTVERSION, "2").set("Bundle-Blueprint", "META-INF/bp/*.xml").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("META-INF/bp/bp.xml", this.getClass().getResourceAsStream("/bp.xml")).build();
    return new Option[] { baseOptions(), Helper.blueprintBundles(), streamBundle(fragmentJar).noStart(), streamBundle(hostJar) };
}
Also used : InputStream(java.io.InputStream) Option(org.ops4j.pax.exam.Option) Configuration(org.ops4j.pax.exam.Configuration)

Aggregations

Configuration (org.ops4j.pax.exam.Configuration)26 Option (org.ops4j.pax.exam.Option)19 File (java.io.File)13 InputStream (java.io.InputStream)4 KarafDistributionOption.karafDistributionConfiguration (org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration)4 KarafDistributionOption.replaceConfigurationFile (org.ops4j.pax.exam.karaf.options.KarafDistributionOption.replaceConfigurationFile)3 MavenArtifactUrlReference (org.ops4j.pax.exam.options.MavenArtifactUrlReference)3 ArrayList (java.util.ArrayList)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 VersionResolver (org.ops4j.pax.exam.options.MavenUrlReference.VersionResolver)1