Yes, it sounds good to me :)

The purpose of providing KarafTestSupport is to simplify the
dependency (a kind of bom) and use.

Regards
JB

On Fri, Mar 24, 2023 at 10:12 PM Steinar Bang <[email protected]> wrote:
>
> >>>>> Steinar Bang <[email protected]>:
>
> > No, provisioning once with @Configuration will be fine, if that
> > actually loads the feature I'm adding.
>
> > I just wasn't sure if @Configuration would work here, since the base
> > class was different, and the example didn't use it, and I have never
> > investigated how the setup of KarafTestSupport classes actually work.
>
> > I thought maybe the installAndAssertFeature() function was necessary to
> > load the feature? (but I have never investigated)
>
> Well... that turned out to be much easier than I thought.
>
> The BaseTest in
>  
> https://github.com/apache/karaf/blob/main/itests/test/src/test/java/org/apache/karaf/itests/DiagnosticTest.java
> wasn't very mysterious...
>  
> https://github.com/apache/karaf/blob/main/itests/test/src/test/java/org/apache/karaf/itests/BaseTest.java
>
> It's just a KarafTestSupport subclass that adds a @Configuration.
>
> So what I did, was:
>  1. Add the feaure to the feature repo option, ie change
>      features(modelstoreFeatureRepo)
>     to
>      features(modelstoreFeatureRepo, "modelstore.backend")
>  2. Remove the following from all tests
>      installAndAssertFeature("modelstore.backend");
>
> and then all tests went green!
>
> Amazing!
>
> Looks like I was overcomplicating things?
>
> Thanks all!
>

Reply via email to