running tests conditionally

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

running tests conditionally

Paolo Corti
Hi devs

I have a test module which needs to test a contrib application
(createlayer, [1]) which requires PostgreSQL and an existing PostGIS
database on the system.
I am planning to have the test module for this contrib application
called from paver only in the case that the conditions are met. Any
good idea to implement this?

thanks and cheers
p

[1] https://github.com/capooti/geonode/tree/create-layer-app

--
Paolo Corti
_______________________________________________
geonode-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-devel
Reply | Threaded
Open this post in threaded view
|

Re: running tests conditionally

Simo D
Ciao Paolo,

what about adding tests and specific settings for database in your contrib app? When activating the app you will have to add it to the INSTALLED_APPS and also add from geonode.contrib.yourapp.settings import *

This way the db will become postgres and the tests of the app will run.

We did something similar for contrib.mp

2017-08-31 22:32 GMT+02:00 Paolo Corti <[hidden email]>:
Hi devs

I have a test module which needs to test a contrib application
(createlayer, [1]) which requires PostgreSQL and an existing PostGIS
database on the system.
I am planning to have the test module for this contrib application
called from paver only in the case that the conditions are met. Any
good idea to implement this?

thanks and cheers
p

[1] https://github.com/capooti/geonode/tree/create-layer-app

--
Paolo Corti
_______________________________________________
geonode-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-devel



--
SimoneĀ 

_______________________________________________
geonode-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-devel
Reply | Threaded
Open this post in threaded view
|

Re: running tests conditionally

Paolo Corti
Hi Simone
I was considering to have the application installed by default. But
yes, it makes sense to leave it out from INSTALLED_APPS (though I
think most of us use PostgreSQL/PostGIS), and have the test running
only it is there
cheers
p

On Fri, Sep 1, 2017 at 3:50 AM, Simone Dalmasso
<[hidden email]> wrote:

> Ciao Paolo,
>
> what about adding tests and specific settings for database in your contrib
> app? When activating the app you will have to add it to the INSTALLED_APPS
> and also add from geonode.contrib.yourapp.settings import *
>
> This way the db will become postgres and the tests of the app will run.
>
> We did something similar for contrib.mp
> https://github.com/GeoNode/geonode/tree/master/geonode/contrib/mp
>
> 2017-08-31 22:32 GMT+02:00 Paolo Corti <[hidden email]>:
>>
>> Hi devs
>>
>> I have a test module which needs to test a contrib application
>> (createlayer, [1]) which requires PostgreSQL and an existing PostGIS
>> database on the system.
>> I am planning to have the test module for this contrib application
>> called from paver only in the case that the conditions are met. Any
>> good idea to implement this?
>>
>> thanks and cheers
>> p
>>
>> [1] https://github.com/capooti/geonode/tree/create-layer-app
>>
>> --
>> Paolo Corti
>> _______________________________________________
>> geonode-devel mailing list
>> [hidden email]
>> https://lists.osgeo.org/mailman/listinfo/geonode-devel
>
>
>
>
> --
> Simone



--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti
_______________________________________________
geonode-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-devel
Reply | Threaded
Open this post in threaded view
|

Re: running tests conditionally

Simo D
eh unfortunately our current tests will fail on postgres....

2017-09-05 16:06 GMT+02:00 Paolo Corti <[hidden email]>:
Hi Simone
I was considering to have the application installed by default. But
yes, it makes sense to leave it out from INSTALLED_APPS (though I
think most of us use PostgreSQL/PostGIS), and have the test running
only it is there
cheers
p

On Fri, Sep 1, 2017 at 3:50 AM, Simone Dalmasso
<[hidden email]> wrote:
> Ciao Paolo,
>
> what about adding tests and specific settings for database in your contrib
> app? When activating the app you will have to add it to the INSTALLED_APPS
> and also add from geonode.contrib.yourapp.settings import *
>
> This way the db will become postgres and the tests of the app will run.
>
> We did something similar for contrib.mp
> https://github.com/GeoNode/geonode/tree/master/geonode/contrib/mp
>
> 2017-08-31 22:32 GMT+02:00 Paolo Corti <[hidden email]>:
>>
>> Hi devs
>>
>> I have a test module which needs to test a contrib application
>> (createlayer, [1]) which requires PostgreSQL and an existing PostGIS
>> database on the system.
>> I am planning to have the test module for this contrib application
>> called from paver only in the case that the conditions are met. Any
>> good idea to implement this?
>>
>> thanks and cheers
>> p
>>
>> [1] https://github.com/capooti/geonode/tree/create-layer-app
>>
>> --
>> Paolo Corti
>> _______________________________________________
>> geonode-devel mailing list
>> [hidden email]
>> https://lists.osgeo.org/mailman/listinfo/geonode-devel
>
>
>
>
> --
> Simone



--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti



--
SimoneĀ 

_______________________________________________
geonode-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-devel