Repository: brooklyn-server Updated Branches: refs/heads/master d961de340 -> 85e1e7279
Removes karaf itests in favour of itests within brooklyn-dist * These tests only test feature install which is covered by feature-validation * There are more representative tests within brooklyn-dist that actaully test the brookyn distribution vs standard karaf Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/162fb1fd Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/162fb1fd Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/162fb1fd Branch: refs/heads/master Commit: 162fb1fdf77c125d7005190b6ae8f134ac1d25f4 Parents: d961de3 Author: Mark McKenna <[email protected]> Authored: Fri Aug 18 14:32:17 2017 +0100 Committer: Mark McKenna <[email protected]> Committed: Fri Aug 18 14:36:03 2017 +0100 ---------------------------------------------------------------------- karaf/itests/pom.xml | 166 ------------------- .../karaf/itests/FeatureInstallationTest.java | 85 ---------- .../apache/brooklyn/karaf/itests/TestBase.java | 36 ---- karaf/pom.xml | 1 - 4 files changed, 288 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/162fb1fd/karaf/itests/pom.xml ---------------------------------------------------------------------- diff --git a/karaf/itests/pom.xml b/karaf/itests/pom.xml deleted file mode 100644 index 5136573..0000000 --- a/karaf/itests/pom.xml +++ /dev/null @@ -1,166 +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. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.brooklyn</groupId> - <artifactId>brooklyn-karaf</artifactId> - <version>0.12.0-SNAPSHOT</version> <!-- BROOKLYN_VERSION --> - </parent> - - <artifactId>brooklyn-features-itests</artifactId> - <name>Brooklyn Karaf Tests</name> - - <dependencies> - <dependency> - <groupId>org.apache.brooklyn</groupId> - <artifactId>brooklyn-core</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.osgi</groupId> - <artifactId>org.osgi.core</artifactId> - <version>${osgi.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.karaf.itests</groupId> - <artifactId>itests</artifactId> - <version>${karaf.version}</version> - <type>test-jar</type> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.karaf</groupId> - <artifactId>apache-karaf</artifactId> - <version>${karaf.version}</version> - <scope>test</scope> - <type>tar.gz</type> - <exclusions> - <exclusion> - <artifactId>org.apache.karaf.client</artifactId> - <groupId>org.apache.karaf</groupId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.ops4j.pax.exam</groupId> - <artifactId>pax-exam-container-karaf</artifactId> - <version>${pax.exam.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.ops4j.pax.exam</groupId> - <artifactId>pax-exam-junit4</artifactId> - <version>${pax.exam.version}</version> - <scope>test</scope> - </dependency> - - <dependency> - <groupId>org.apache.geronimo.specs</groupId> - <artifactId>geronimo-atinject_1.0_spec</artifactId> - <version>1.0</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.servicemix.tooling</groupId> - <artifactId>depends-maven-plugin</artifactId> - <version>${maven.depends.plugin.version}</version> - <executions> - <execution> - <id>generate-depends-file</id> - <goals> - <goal>generate-depends-file</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy-features-xml</id> - <phase>process-test-resources</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.apache.brooklyn</groupId> - <artifactId>brooklyn-features</artifactId> - <version>${project.version}</version> - <classifier>features</classifier> - <type>xml</type> - <outputDirectory>${project.build.directory}/</outputDirectory> - <destFileName>features.xml</destFileName> - </artifactItem> - </artifactItems> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.karaf.tooling</groupId> - <artifactId>karaf-maven-plugin</artifactId> - <version>${karaf.version}</version> - <executions> - <execution> - <id>add-features-to-repo</id> - <phase>process-test-resources</phase> - <goals> - <goal>features-add-to-repository</goal> - </goals> - <configuration> - <features> - <feature>brooklyn-core</feature> - <feature>brooklyn-locations-jclouds</feature> - </features> - <descriptors> - <descriptor>file:${project.build.directory}/features.xml</descriptor> - </descriptors> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <systemPropertyVariables> - <features.xml>${project.build.directory}/features.xml</features.xml> - <features.repo>${project.build.directory}/features-repo</features.repo> - </systemPropertyVariables> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/162fb1fd/karaf/itests/src/test/java/org/apache/brooklyn/karaf/itests/FeatureInstallationTest.java ---------------------------------------------------------------------- diff --git a/karaf/itests/src/test/java/org/apache/brooklyn/karaf/itests/FeatureInstallationTest.java b/karaf/itests/src/test/java/org/apache/brooklyn/karaf/itests/FeatureInstallationTest.java deleted file mode 100644 index a7bef36..0000000 --- a/karaf/itests/src/test/java/org/apache/brooklyn/karaf/itests/FeatureInstallationTest.java +++ /dev/null @@ -1,85 +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.brooklyn.karaf.itests; - -import static org.ops4j.pax.exam.CoreOptions.maven; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureConsole; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureSecurity; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFileExtend; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel; - -import java.io.File; - -import javax.inject.Inject; - -import org.apache.karaf.features.FeaturesService; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.karaf.options.LogLevelOption; -import org.ops4j.pax.exam.options.MavenArtifactUrlReference; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerClass; - - -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerClass.class) -public class FeatureInstallationTest extends TestBase { - - @Inject - FeaturesService featuresService; - - @Test - public void testBrooklynApiFeature() throws Exception { - featuresService.addRepository(getFeaturesFile().toURI()); - featuresService.installFeature("brooklyn-api"); - } - - @Test - public void testBrooklynCoreFeature() throws Exception { - featuresService.addRepository(getFeaturesFile().toURI()); - featuresService.installFeature("brooklyn-core"); - } - - @Test - public void testBrooklynLocationsJcloudsFeature() throws Exception { - featuresService.addRepository(getFeaturesFile().toURI()); - featuresService.installFeature("brooklyn-locations-jclouds"); - } - - @Configuration - public Option[] config() { - MavenArtifactUrlReference karafUrl = maven().groupId("org.apache.karaf").artifactId("apache-karaf").versionAsInProject().type("tar.gz"); - return new Option[]{ - karafDistributionConfiguration().frameworkUrl(karafUrl).name("Apache Karaf").unpackDirectory(new File("target/exam")), - configureSecurity().disableKarafMBeanServerBuilder(), - configureConsole().ignoreLocalConsole(), - keepRuntimeFolder(), - editConfigurationFilePut("etc/system.properties", "features.xml", System.getProperty("features.xml")), - editConfigurationFileExtend( - "etc/org.ops4j.pax.url.mvn.cfg", - "org.ops4j.pax.url.mvn.repositories", - "file:"+System.getProperty("features.repo")+"@id=local@snapshots"), - logLevel(LogLevelOption.LogLevel.INFO), - }; - } -} http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/162fb1fd/karaf/itests/src/test/java/org/apache/brooklyn/karaf/itests/TestBase.java ---------------------------------------------------------------------- diff --git a/karaf/itests/src/test/java/org/apache/brooklyn/karaf/itests/TestBase.java b/karaf/itests/src/test/java/org/apache/brooklyn/karaf/itests/TestBase.java deleted file mode 100644 index b8a2e6d..0000000 --- a/karaf/itests/src/test/java/org/apache/brooklyn/karaf/itests/TestBase.java +++ /dev/null @@ -1,36 +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.brooklyn.karaf.itests; - -import java.io.File; -import java.net.URISyntaxException; - -import org.junit.Assert; - -public class TestBase { - - private static final String FEATURES_XML = "features.xml"; - - static File getFeaturesFile() throws URISyntaxException { - String featuresXml = System.getProperty(FEATURES_XML); - Assert.assertNotNull(featuresXml); - File featuresFile = new File(featuresXml); - Assert.assertNotNull(featuresFile.exists()); - return featuresFile; - } - -} http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/162fb1fd/karaf/pom.xml ---------------------------------------------------------------------- diff --git a/karaf/pom.xml b/karaf/pom.xml index 8ef2e23..071cb7a 100644 --- a/karaf/pom.xml +++ b/karaf/pom.xml @@ -65,7 +65,6 @@ <module>httpcomponent-extension</module> <module>features</module> <module>commands</module> - <module>itests</module> </modules> <build>
