[owncloud-devel] Installing App when running unit tests
Tobia De Koninck
tobia at ledfan.be
Sat Apr 18 14:49:53 GMT 2015
I agree you don not want apps to enable and install or even download
In the unit tests of the Chat app I also test my DataMappers and their
SQL queries. I use a few special queries which works well now, but there
were some SQL errors on other DRBMS in the past.
But before these tests can be run, the DB tables have to be created. I
don't know how to do this without using private methods?
Op 18-04-15 om 16:02 schreef Bernhard Posselt:
> Usecase for those methods? App installer/enabling an app utterly
> confusing and is scattered in multiple places in core; it needs to be
> cleaned up at some point. Relying on that private api feature will
> likely break your app in future releases.
> On 04/18/2015 03:44 PM, Tobia De Koninck wrote:
>> Hey! Thanks for the answer.
>> Problem is \OCP\App doesn't have an enable/install method
>> (https://github.com/owncloud/core/blob/master/lib/public/app.php) and
>> AppManager only enables the app, it doesn't install it. (i.e. creating
>> database tables)
>> Op 18-04-15 om 15:34 schreef Bernhard Posselt:
>>> OC_Hook and OC_App both have public interface counterparts, use them ;)
>>> On 04/18/2015 03:32 PM, Tobia De Koninck wrote:
>>>> The Chat app doesn't pass the code check in 8.1 (refs
>>>> To be able to run DB unit tests, I have to install (not only enable)
>>>> the app before the unit tests are run. However the only method to this
>>>> is OC_App::enable('chat'); . Of course this doesn't pass the code
>>>> How should I enable the app?
>>>> Tobia (LEDfan)
>>>> Devel mailing list
>>>> Devel at owncloud.org
>>> Devel mailing list
>>> Devel at owncloud.org
>> Devel mailing list
>> Devel at owncloud.org
> Devel mailing list
> Devel at owncloud.org
More information about the Devel