[GitHub] brooklyn-server pull request #516: Add unit tests for Karaf features

2017-04-10 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/brooklyn-server/pull/516


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #516: Add unit tests for Karaf features

2017-03-01 Thread aledsage
Github user aledsage commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/516#discussion_r103745402
  
--- Diff: karaf/pom.xml ---
@@ -34,21 +34,29 @@
   
   
 
+6.0.0
 5.0.0 
-
+
 
1.0.0
 
 
-4.7.0
-2.4.3
+4.9.1
+2.5.2
 1.0.0
 
 
 6.0.0
 0.9.9_1 
 
+
1.10
+3.0.1
+1.3
+
 ${java.version}
 ${java.version}
+
+2.2.0_2
--- End diff --

I wonder where this should be defined - should it be in the root `pom.xml`, 
alongside all the other dependency versions? Or should it be here (closer to 
where it's used in feature.xml)? I lean towards the former. But no strong 
feelings.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #516: Add unit tests for Karaf features

2017-03-01 Thread aledsage
Github user aledsage commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/516#discussion_r103744978
  
--- Diff: karaf/pom.xml ---
@@ -34,21 +34,29 @@
   
   
 
+6.0.0
 5.0.0 
-
+
 
1.0.0
 
 
-4.7.0
-2.4.3
+4.9.1
+2.5.2
 1.0.0
 
 
 6.0.0
 0.9.9_1 
 
+
1.10
--- End diff --

Where is this used?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #516: Add unit tests for Karaf features

2017-03-01 Thread aledsage
Github user aledsage commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/516#discussion_r103744542
  
--- Diff: core/pom.xml ---
@@ -60,6 +60,7 @@
 
 com.hierynomus
 sshj
+${sshj.version}
--- End diff --

Do we really need this line? It's defined int he `dependencyManagement` 
section of `parent/pom.xml`, so we shouldn't have to repeat it here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #516: Add unit tests for Karaf features

2017-02-24 Thread googlielmo
Github user googlielmo commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/516#discussion_r102925419
  
--- Diff: 
karaf/itests/src/test/java/org/apache/brooklyn/karaf/itests/FeatureInstallationTest.java
 ---
@@ -0,0 +1,83 @@
+/*
+ * 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.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 {
+
--- End diff --

Had a look at this with @andreaturli who wrote the first unit tests in this 
PR.
It's fair to say that at the moment this is quite similar to the `verify` 
phase of the karaf-maven-plugin, especially as we're using the `PerClass` Exam 
reactor strategy.
At the same time, yes we can add more tests / assertions to check the 
health of karaf / brooklyn, good point! Will add some.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #516: Add unit tests for Karaf features

2017-02-18 Thread m4rkmckenna
Github user m4rkmckenna commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/516#discussion_r101894152
  
--- Diff: karaf/itests/pom.xml ---
@@ -0,0 +1,172 @@
+
+
+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;>
+
+4.0.0
+
+org.apache.brooklyn
+brooklyn-karaf
+0.11.0-SNAPSHOT  
+
+
+brooklyn-features-itests
+Brooklyn Karaf Tests
+
+
+
+org.apache.brooklyn
+brooklyn-core
+${project.version}
+
+
+org.osgi
+org.osgi.core
+${osgi.version}
+test
+
+
+
+org.apache.karaf.itests
+itests
+${karaf.version}
+test-jar
+test
+
+
+
+org.apache.karaf
+apache-karaf
+${karaf.version}
+test
+tar.gz
+
+
+org.apache.karaf.client
+org.apache.karaf
+
+
+
+
+
+org.ops4j.pax.exam
+pax-exam-container-karaf
+${pax.exam.version}
+test
+
+
+org.ops4j.pax.exam
+pax-exam-container-karaf
+${pax.exam.version}
+test
+
+
+
+org.ops4j.pax.exam
+pax-exam-junit4
+${pax.exam.version}
+test
+
+
+
+org.apache.geronimo.specs
+geronimo-atinject_1.0_spec
+1.0
--- End diff --

Should be parameterise 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #516: Add unit tests for Karaf features

2017-02-18 Thread m4rkmckenna
Github user m4rkmckenna commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/516#discussion_r101894381
  
--- Diff: 
karaf/itests/src/test/java/org/apache/brooklyn/karaf/itests/FeatureInstallationTest.java
 ---
@@ -0,0 +1,83 @@
+/*
+ * 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.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 {
+
--- End diff --

Can you comment on how this differs from the `verify` phase of the 
[karaf-maven-plugin](https://svn.apache.org/repos/asf/karaf/site/production/manual/latest/karaf-maven-plugin.html#__code_karaf_verify_code)

(Differentiator to karaf-maven-plugin) Should we be performing some sort of 
assertion after feature install?

ie can we establish the health of the karaf / brooklyn kernel?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #516: Add unit tests for Karaf features

2017-02-16 Thread googlielmo
Github user googlielmo commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/516#discussion_r101520600
  
--- Diff: karaf/features/src/main/feature/feature.xml ---
@@ -260,7 +260,7 @@
 https://github.com/square/okhttp/pull/2246
 -->
 
-wrap:mvn:com.squareup.okhttp/okhttp/2.2.0$Import-Package=org.apache.http.*;resolution:=optional,android.util.*;resolution:=optional,okio;version=%27[1.2.0,1.3.0)%27,*
+mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okhttp/2.2.0_2
--- End diff --

Hi @m4rkmckenna servicemix accepted my pull request 
https://github.com/apache/servicemix-bundles/pull/91 so it's safe to use their 
version now! 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #516: Add unit tests for Karaf features

2017-02-15 Thread m4rkmckenna
Github user m4rkmckenna commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/516#discussion_r101255832
  
--- Diff: karaf/features/src/main/feature/feature.xml ---
@@ -260,7 +260,7 @@
 https://github.com/square/okhttp/pull/2246
 -->
 
-wrap:mvn:com.squareup.okhttp/okhttp/2.2.0$Import-Package=org.apache.http.*;resolution:=optional,android.util.*;resolution:=optional,okio;version=%27[1.2.0,1.3.0)%27,*
+mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okhttp/2.2.0_2
--- End diff --

Can you explain your reasoning for this ... I remember there being an issue 
with the servicemix wrapped version

Also version should be parameterised 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #516: Add unit tests for Karaf features

2017-02-15 Thread m4rkmckenna
Github user m4rkmckenna commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/516#discussion_r101255259
  
--- Diff: karaf/itests/pom.xml ---
@@ -0,0 +1,180 @@
+
+
+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;>
+
+4.0.0
+
+org.apache.brooklyn
+brooklyn-karaf
+0.11.0-SNAPSHOT  
+
+
+brooklyn-features-itests
+Brooklyn Karaf Tests
+
+
+6.0.0
+4.9.1
+2.5.2
+3.1.0
+1.1.0.Final
+
+
+
+
+org.apache.brooklyn
+brooklyn-core
+${project.version}
+
+
+org.osgi
+org.osgi.core
+${osgi.version}
+test
+
+
+
+org.apache.karaf.itests
+itests
+${karaf.version}
+test-jar
+test
+
+
+
+org.apache.karaf
+apache-karaf
+${karaf.version}
+test
+tar.gz
+
+
+org.apache.karaf.client
+org.apache.karaf
+
+
+
+
+
+org.ops4j.pax.exam
+pax-exam-container-karaf
+${pax.exam.version}
+test
+
+
+org.ops4j.pax.exam
+pax-exam-container-karaf
+${pax.exam.version}
+test
+
+
+
+org.ops4j.pax.exam
+pax-exam-junit4
+${pax.exam.version}
+test
+
+
+
+org.apache.geronimo.specs
+geronimo-atinject_1.0_spec
+1.0
+test
+
+
+
+
+
+
+org.apache.servicemix.tooling
+depends-maven-plugin
+1.3
--- End diff --

Should be parameterised 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #516: Add unit tests for Karaf features

2017-02-15 Thread m4rkmckenna
Github user m4rkmckenna commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/516#discussion_r101255165
  
--- Diff: karaf/itests/pom.xml ---
@@ -0,0 +1,180 @@
+
+
+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;>
+
+4.0.0
+
+org.apache.brooklyn
+brooklyn-karaf
+0.11.0-SNAPSHOT  
+
+
+brooklyn-features-itests
+Brooklyn Karaf Tests
+
+
+6.0.0
+4.9.1
+2.5.2
+3.1.0
+1.1.0.Final
--- End diff --

Can you move these to the parent pom


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---