You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by googlielmo <gi...@git.apache.org> on 2017/01/13 09:53:18 UTC

[GitHub] brooklyn-server pull request #516: [WIP] Feature/test karaf features

GitHub user googlielmo opened a pull request:

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

    [WIP] Feature/test karaf features

    Work in progress - do not merge yet.
    
    Add pax exam itests to brooklyn server / karaf


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/googlielmo/brooklyn-server feature/test-karaf-features

Alternatively you can review and apply these changes as the patch at:

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

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #516
    
----
commit c5d2f168aecd5c70b658458c3577580093fb9afb
Author: Andrea Turli <an...@gmail.com>
Date:   2017-01-04T15:01:10Z

    wip

commit 5a6ef69320c7b8c69412e41e0e25e9010e3f74d1
Author: Andrea Turli <an...@gmail.com>
Date:   2017-01-08T19:31:13Z

    wip

commit c14df3a3f0e93aa6e3044ab159fa2779a2fd39cb
Author: Guglielmo Nigri <gu...@cloudsoftcorp.com>
Date:   2017-01-12T14:25:19Z

    wip - tests passing

commit 38d677a4251614694a41c04f5ff102f336379866
Author: Guglielmo Nigri <gu...@cloudsoftcorp.com>
Date:   2017-01-12T17:06:42Z

    wip - revert to correct version of sshj

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the issue:

    https://github.com/apache/brooklyn-server/pull/516
  
    @googlielmo (cc @m4rkmckenna) given Marks' comment about seeing value in this, then I'm fine with us merging it and then iterating on it to add more assertions (as we find time to do that). That feels better than having the PR sitting around for longer. Does that sound sensible to you @m4rkmckenna?
    
    @googlielmo can you squash your commits please, and ensure there is a nice description on the commit(s)? (We want the commits descriptions to be understandable when glancing through the history of Brooklyn commits, where we can't easily tell which PR they were in; commit messages like "wip" don't tell us what it's for).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #516: [WIP] Feature/test karaf features

Posted by googlielmo <gi...@git.apache.org>.
Github user googlielmo commented on the issue:

    https://github.com/apache/brooklyn-server/pull/516
  
    hi @geomacy, yes I'm aware of that; as these are actually unit tests (not integration tests), the idea is to test the `brooklyn-server` features at every build, to spot regressions early on, especially in view of a simplification of dependencies (which is another effort going on in parallel). These being local tests, I think they can co-exist with the broader ones in dist. Wdyt?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by googlielmo <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by googlielmo <gi...@git.apache.org>.
Github user googlielmo commented on the issue:

    https://github.com/apache/brooklyn-server/pull/516
  
    Rebased on master (not squashed)


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by m4rkmckenna <gi...@git.apache.org>.
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 @@
    +<?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.11.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
    +    </parent>
    +
    +    <artifactId>brooklyn-features-itests</artifactId>
    +    <name>Brooklyn Karaf Tests</name>
    +
    +    <properties>
    +        <osgi.version>6.0.0</osgi.version>
    +        <pax.exam.version>4.9.1</pax.exam.version>
    +        <pax-url.version>2.5.2</pax-url.version>
    +        <servlet.api.version>3.1.0</servlet.api.version>
    +        <validation.api.version>1.1.0.Final</validation.api.version>
    --- 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by asfgit <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by aledsage <gi...@git.apache.org>.
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 @@
       
       <properties>
     
    +    <osgi.version>6.0.0</osgi.version>
         <org.osgi.compendium.version>5.0.0</org.osgi.compendium.version> <!-- duplicate in brooklyn-dist/dist-karaf/pom.xml -->
    -    
    +
         <lifecycle-mapping-plugin.version>1.0.0</lifecycle-mapping-plugin.version>
     
         <!-- pax-exam -->
    -    <pax.exam.version>4.7.0</pax.exam.version>
    -    <pax.url.version>2.4.3</pax.url.version>
    +    <pax.exam.version>4.9.1</pax.exam.version>
    +    <pax.url.version>2.5.2</pax.url.version>
         <tinybundles.version>1.0.0</tinybundles.version>
     
         <!-- feature repositories -->
         <servicemix.version>6.0.0</servicemix.version>
         <reflections.bundle.version>0.9.9_1</reflections.bundle.version> <!-- see reflections.version -->
     
    +    <maven.buildhelper.plugin.version>1.10</maven.buildhelper.plugin.version>
    +    <maven.resources.plugin.version>3.0.1</maven.resources.plugin.version>
    +    <maven.depends.plugin.version>1.3</maven.depends.plugin.version>
    +
         <maven.compiler.source>${java.version}</maven.compiler.source>
         <maven.compiler.target>${java.version}</maven.compiler.target>
    +
    +    <okhttp.bundle.version>2.2.0_2</okhttp.bundle.version>
    --- 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by m4rkmckenna <gi...@git.apache.org>.
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
             -->
             <!-- TODO use ServiceMix bundle for okhttp when dependency on okio is fixed there -->
    -        <bundle dependency="true">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,*</bundle>
    +        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okhttp/2.2.0_2</bundle>
    --- 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by googlielmo <gi...@git.apache.org>.
Github user googlielmo commented on the issue:

    https://github.com/apache/brooklyn-server/pull/516
  
    @aledsage I squashed and edited the commit messages to something more useful.
    If it's okay to you and @m4rkmckenna I second the idea of merging it and then iterating on it to add more assertions.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by googlielmo <gi...@git.apache.org>.
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
             -->
             <!-- TODO use ServiceMix bundle for okhttp when dependency on okio is fixed there -->
    -        <bundle dependency="true">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,*</bundle>
    +        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.okhttp/2.2.0_2</bundle>
    --- 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #516: [WIP] Feature/test karaf features

Posted by googlielmo <gi...@git.apache.org>.
Github user googlielmo commented on the issue:

    https://github.com/apache/brooklyn-server/pull/516
  
    I should have clarified the (somewhat limited) scope of this PR in the first place, thank you for giving me the occasion to do it @geomacy \U0001f642 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by aledsage <gi...@git.apache.org>.
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 @@
             <dependency>
                 <groupId>com.hierynomus</groupId>
                 <artifactId>sshj</artifactId>
    +            <version>${sshj.version}</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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #516: [WIP] Feature/test karaf features

Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on the issue:

    https://github.com/apache/brooklyn-server/pull/516
  
    @googlielmo I guess that seems sensible, just wondered if you knew about them. thanks


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by m4rkmckenna <gi...@git.apache.org>.
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 @@
    +<?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.11.0-SNAPSHOT</version>  <!-- BROOKLYN_VERSION -->
    +    </parent>
    +
    +    <artifactId>brooklyn-features-itests</artifactId>
    +    <name>Brooklyn Karaf Tests</name>
    +
    +    <properties>
    +        <osgi.version>6.0.0</osgi.version>
    +        <pax.exam.version>4.9.1</pax.exam.version>
    +        <pax-url.version>2.5.2</pax-url.version>
    +        <servlet.api.version>3.1.0</servlet.api.version>
    +        <validation.api.version>1.1.0.Final</validation.api.version>
    +    </properties>
    +
    +    <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-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>1.3</version>
    --- 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by m4rkmckenna <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by googlielmo <gi...@git.apache.org>.
Github user googlielmo commented on the issue:

    https://github.com/apache/brooklyn-server/pull/516
  
    Thanks for the comments @m4rkmckenna. Will address them with a new commit.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-server issue #516: [WIP] Feature/test karaf features

Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on the issue:

    https://github.com/apache/brooklyn-server/pull/516
  
    hi @googlielmo do you know there are pax exam tests for karaf in brooklyn-dist?  If I recall correctly, the tests are there because they are testing the whole of brooklyn (not just brooklyn-server). 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by aledsage <gi...@git.apache.org>.
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 @@
       
       <properties>
     
    +    <osgi.version>6.0.0</osgi.version>
         <org.osgi.compendium.version>5.0.0</org.osgi.compendium.version> <!-- duplicate in brooklyn-dist/dist-karaf/pom.xml -->
    -    
    +
         <lifecycle-mapping-plugin.version>1.0.0</lifecycle-mapping-plugin.version>
     
         <!-- pax-exam -->
    -    <pax.exam.version>4.7.0</pax.exam.version>
    -    <pax.url.version>2.4.3</pax.url.version>
    +    <pax.exam.version>4.9.1</pax.exam.version>
    +    <pax.url.version>2.5.2</pax.url.version>
         <tinybundles.version>1.0.0</tinybundles.version>
     
         <!-- feature repositories -->
         <servicemix.version>6.0.0</servicemix.version>
         <reflections.bundle.version>0.9.9_1</reflections.bundle.version> <!-- see reflections.version -->
     
    +    <maven.buildhelper.plugin.version>1.10</maven.buildhelper.plugin.version>
    --- 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by m4rkmckenna <gi...@git.apache.org>.
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 @@
    +<?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.11.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-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>
    --- 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by drigodwin <gi...@git.apache.org>.
Github user drigodwin commented on the issue:

    https://github.com/apache/brooklyn-server/pull/516
  
    I agree that we should merge this and iterate, since there have been no more comments I'm going to do that now. Thanks @googlielmo @m4rkmckenna @aledsage 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---