You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Ian Duffy <ia...@ianduffy.ie> on 2013/07/10 11:24:53 UTC

GSoC: Integration - Bring up Embedded LDAP Server

Hi,

I was looking at the integration test within
test/integration/component/test_ldap.py and noticed that all the
hostnames are hard coded IPs.

Is it possible to bring up a standalone embedded LDAP server such as
ApacheDS during execution of integration tests?

Thanks,
Ian

Re: GSoC: Integration - Bring up Embedded LDAP Server

Posted by Ian Duffy <ia...@ianduffy.ie>.
> Did you try bind this to the pre-integration-test phase of the
> client module?  See how marvin.setup profile does this for the checkin
> tests.

Cool will check that, could be a solution. I've parked this idea for
now. Currently writing the tests and will come back to it at a later
date.

Re: GSoC: Integration - Bring up Embedded LDAP Server

Posted by Prasanna Santhanam <ts...@apache.org>.
On Wed, Jul 10, 2013 at 02:41:07PM +0100, Ian Duffy wrote:
> > Will the ldap:run launch another war?
> 
> I have no idea.... Just reading it from
> http://ldap-maven-plugin.btmatthews.com/run-mojo.html

Did you try bind this to the pre-integration-test phase of the
client module?  See how marvin.setup profile does this for the checkin
tests.

> 
> I think what I want to do is execute different phases on different
> projects.
> 
> I could do:
> 
> mvn -pl :cloud-client-ui jetty:run
> 
> followed by:
> 
> mvn -pl :cloud-plugin-user-authenticator-ldap ldap:run
> 
> but it would nice to have them coming up together.
> 
-- 
Prasanna.,

------------------------
Powered by BigRock.com


Re: GSoC: Integration - Bring up Embedded LDAP Server

Posted by Ian Duffy <ia...@ianduffy.ie>.
> Will the ldap:run launch another war?

I have no idea.... Just reading it from
http://ldap-maven-plugin.btmatthews.com/run-mojo.html

I think what I want to do is execute different phases on different projects.

I could do:

mvn -pl :cloud-client-ui jetty:run

followed by:

mvn -pl :cloud-plugin-user-authenticator-ldap ldap:run

but it would nice to have them coming up together.

On 10 July 2013 11:34, Prasanna Santhanam <ts...@apache.org> wrote:
> On Wed, Jul 10, 2013 at 11:28:05AM +0100, Ian Duffy wrote:
>> > Sounds like a good idea if all config is in flat files. Runnable from
>> > maven and can be linked with the checkin tests
>>
>> Newbie maven question....
>>
>> Is it possible to do something like:
>> mvn -pl :cloud-client-ui jetty-run
>> :cloud-plugin-user-authenticator-ldap ldap:run
>>
>
> mvn rookie to newbie : I haven't come across something like that :)
> Will the ldap:run launch another war?
>
> See: http://stackoverflow.com/questions/5519066/possible-to-run-two-webapps-at-once-when-developing-with-maven-eclipse
>
> --
> Prasanna.,
>
> ------------------------
> Powered by BigRock.com
>

Re: GSoC: Integration - Bring up Embedded LDAP Server

Posted by Prasanna Santhanam <ts...@apache.org>.
On Wed, Jul 10, 2013 at 11:28:05AM +0100, Ian Duffy wrote:
> > Sounds like a good idea if all config is in flat files. Runnable from
> > maven and can be linked with the checkin tests
> 
> Newbie maven question....
> 
> Is it possible to do something like:
> mvn -pl :cloud-client-ui jetty-run
> :cloud-plugin-user-authenticator-ldap ldap:run
> 

mvn rookie to newbie : I haven't come across something like that :)
Will the ldap:run launch another war?

See: http://stackoverflow.com/questions/5519066/possible-to-run-two-webapps-at-once-when-developing-with-maven-eclipse
 
-- 
Prasanna.,

------------------------
Powered by BigRock.com


Re: GSoC: Integration - Bring up Embedded LDAP Server

Posted by Ian Duffy <ia...@ianduffy.ie>.
> Sounds like a good idea if all config is in flat files. Runnable from
> maven and can be linked with the checkin tests

Newbie maven question....

Is it possible to do something like:
mvn -pl :cloud-client-ui jetty-run
:cloud-plugin-user-authenticator-ldap ldap:run


On 10 July 2013 11:11, Prasanna Santhanam <ts...@apache.org> wrote:
> On Wed, Jul 10, 2013 at 10:43:07AM +0100, Ian Duffy wrote:
>> > How difficult would it be? If it pollutes the
>> > test and makes it complex
>>
>> I know there that there is a maven plugin that will bring up an
>> apacheds server based of flat ldif files:
>> http://ldap-maven-plugin.btmatthews.com/. Would it be possible to
>> trigger that to startup when cloud-client-ui jetty:run is launched
>> with some extra goal to state its for integration test purposes?
>>
>
> Sounds like a good idea if all config is in flat files. Runnable from
> maven and can be linked with the checkin tests.
>
>> > If it pollutes the test and makes it complex, we should probably
>> > just use a pre-installed instance and point to it.
>>
>> Wouldn't that be more acceptance level testing? It would mean anybody
>> wanting to run the integration tests would require the instance.
>>
>
> Yes - the integration tests are of this nature. Ones with backing
> infrastructure. However, since you are only looking at user
> provisioning and auth it should be ok to do this test through a maven
> profile to setup the ApacheDS. When the tests are run on actual
> physical infrastructure I will be setting up the Apache DS instance
> that will be static and/or pointing to something like open-ldap.
>
>> On 10 July 2013 10:32, Prasanna Santhanam <ts...@apache.org> wrote:
>> > On Wed, Jul 10, 2013 at 10:24:53AM +0100, Ian Duffy wrote:
>> >> Hi,
>> >>
>> >> I was looking at the integration test within
>> >> test/integration/component/test_ldap.py and noticed that all the
>> >> hostnames are hard coded IPs.
>> >>
>> >> Is it possible to bring up a standalone embedded LDAP server such as
>> >> ApacheDS during execution of integration tests?
>> >>
>> > Hasn't been attempted. How difficult would it be? If it pollutes the
>> > test and makes it complex, we should probably just use a pre-installed
>> > instance and point to it.
>> >
>> > --
>> > Prasanna.,
>> >
>> > ------------------------
>> > Powered by BigRock.com
>> >
>
> --
> Prasanna.,
>
> ------------------------
> Powered by BigRock.com
>

Re: GSoC: Integration - Bring up Embedded LDAP Server

Posted by Prasanna Santhanam <ts...@apache.org>.
On Wed, Jul 10, 2013 at 10:43:07AM +0100, Ian Duffy wrote:
> > How difficult would it be? If it pollutes the
> > test and makes it complex
> 
> I know there that there is a maven plugin that will bring up an
> apacheds server based of flat ldif files:
> http://ldap-maven-plugin.btmatthews.com/. Would it be possible to
> trigger that to startup when cloud-client-ui jetty:run is launched
> with some extra goal to state its for integration test purposes?
> 

Sounds like a good idea if all config is in flat files. Runnable from
maven and can be linked with the checkin tests.

> > If it pollutes the test and makes it complex, we should probably
> > just use a pre-installed instance and point to it.
> 
> Wouldn't that be more acceptance level testing? It would mean anybody
> wanting to run the integration tests would require the instance.
> 

Yes - the integration tests are of this nature. Ones with backing
infrastructure. However, since you are only looking at user
provisioning and auth it should be ok to do this test through a maven
profile to setup the ApacheDS. When the tests are run on actual
physical infrastructure I will be setting up the Apache DS instance
that will be static and/or pointing to something like open-ldap.

> On 10 July 2013 10:32, Prasanna Santhanam <ts...@apache.org> wrote:
> > On Wed, Jul 10, 2013 at 10:24:53AM +0100, Ian Duffy wrote:
> >> Hi,
> >>
> >> I was looking at the integration test within
> >> test/integration/component/test_ldap.py and noticed that all the
> >> hostnames are hard coded IPs.
> >>
> >> Is it possible to bring up a standalone embedded LDAP server such as
> >> ApacheDS during execution of integration tests?
> >>
> > Hasn't been attempted. How difficult would it be? If it pollutes the
> > test and makes it complex, we should probably just use a pre-installed
> > instance and point to it.
> >
> > --
> > Prasanna.,
> >
> > ------------------------
> > Powered by BigRock.com
> >

-- 
Prasanna.,

------------------------
Powered by BigRock.com


Re: GSoC: Integration - Bring up Embedded LDAP Server

Posted by Ian Duffy <ia...@ianduffy.ie>.
> How difficult would it be? If it pollutes the
> test and makes it complex

I know there that there is a maven plugin that will bring up an
apacheds server based of flat ldif files:
http://ldap-maven-plugin.btmatthews.com/. Would it be possible to
trigger that to startup when cloud-client-ui jetty:run is launched
with some extra goal to state its for integration test purposes?

> If it pollutes the test and makes it complex, we should probably just use a pre-installed
> instance and point to it.

Wouldn't that be more acceptance level testing? It would mean anybody
wanting to run the integration tests would require the instance.

On 10 July 2013 10:32, Prasanna Santhanam <ts...@apache.org> wrote:
> On Wed, Jul 10, 2013 at 10:24:53AM +0100, Ian Duffy wrote:
>> Hi,
>>
>> I was looking at the integration test within
>> test/integration/component/test_ldap.py and noticed that all the
>> hostnames are hard coded IPs.
>>
>> Is it possible to bring up a standalone embedded LDAP server such as
>> ApacheDS during execution of integration tests?
>>
> Hasn't been attempted. How difficult would it be? If it pollutes the
> test and makes it complex, we should probably just use a pre-installed
> instance and point to it.
>
> --
> Prasanna.,
>
> ------------------------
> Powered by BigRock.com
>

Re: GSoC: Integration - Bring up Embedded LDAP Server

Posted by Prasanna Santhanam <ts...@apache.org>.
On Wed, Jul 10, 2013 at 10:24:53AM +0100, Ian Duffy wrote:
> Hi,
> 
> I was looking at the integration test within
> test/integration/component/test_ldap.py and noticed that all the
> hostnames are hard coded IPs.
> 
> Is it possible to bring up a standalone embedded LDAP server such as
> ApacheDS during execution of integration tests?
> 
Hasn't been attempted. How difficult would it be? If it pollutes the
test and makes it complex, we should probably just use a pre-installed
instance and point to it.

-- 
Prasanna.,

------------------------
Powered by BigRock.com