Re: Executing a Karaf command in Pax Exam Test

2017-08-13 Thread Kerry

Thanks Achim. I also discovered from that code the BootFinished class.. very 
useful to know.


On 13/08/17 13:52, Achim Nierbeck wrote:

Hi,

take a look at these lines, they'll give you something similar I'm sure:
https://github.com/ANierbeck/Karaf-Cassandra/blob/master/Karaf-Cassandra-ITest/src/test/java/de/nierbeck/cassandra/itest/TestBase.java#L150-L180

btw. if in doubt, there are a couple of tests around that class using it.
So there should be plenty of samples ;)

regards, Achim


2017-08-13 14:06 GMT+02:00 Kerry mailto:karaf-u...@avionicengineers.com>>:

Hi,

I'm writing an integration test and in it I want to execute the Karaf 
'install' command. I don't want to provision the bundle at Karaf start-up but 
specifically attempt to install it in a test to ensure a certain behaviour 
occurs.

I found this page: 
http://planet.jboss.org/post/advanced_integration_testing_with_pax_exam_karaf 
 
and it makes use of a 'CommandProcessor' interface but searching the current Karaf 
source code it appears this class no longer exists.

Is there a way that I can achieve the above?

Thanks

Kerry




--

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer & 
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master





Re: Executing a Karaf command in Pax Exam Test

2017-08-13 Thread Achim Nierbeck
Hi,

take a look at these lines, they'll give you something similar I'm sure:
https://github.com/ANierbeck/Karaf-Cassandra/blob/master/Karaf-Cassandra-ITest/src/test/java/de/nierbeck/cassandra/itest/TestBase.java#L150-L180

btw. if in doubt, there are a couple of tests around that class using it.
So there should be plenty of samples ;)

regards, Achim


2017-08-13 14:06 GMT+02:00 Kerry :

> Hi,
>
> I'm writing an integration test and in it I want to execute the Karaf
> 'install' command. I don't want to provision the bundle at Karaf start-up
> but specifically attempt to install it in a test to ensure a certain
> behaviour occurs.
>
> I found this page: http://planet.jboss.org/post/a
> dvanced_integration_testing_with_pax_exam_karaf and it makes use of a
> 'CommandProcessor' interface but searching the current Karaf source code it
> appears this class no longer exists.
>
> Is there a way that I can achieve the above?
>
> Thanks
>
> Kerry
>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master


Executing a Karaf command in Pax Exam Test

2017-08-13 Thread Kerry

Hi,

I'm writing an integration test and in it I want to execute the Karaf 'install' 
command. I don't want to provision the bundle at Karaf start-up but 
specifically attempt to install it in a test to ensure a certain behaviour 
occurs.

I found this page: 
http://planet.jboss.org/post/advanced_integration_testing_with_pax_exam_karaf 
and it makes use of a 'CommandProcessor' interface but searching the current 
Karaf source code it appears this class no longer exists.

Is there a way that I can achieve the above?

Thanks

Kerry