Actually it was not a hollywar but a small discussion which get no continuation 
due to low priority and some technical problems.

The point is that ATM unit tests in python-fuelclient act like integration 
tests because they require a live instance of the Nailgun API and certain data 
in Nailgun’s DB. The straightforward solution is of course to mock everything 
and pretend to be happy. However, being happy wont last for too long because 
once Nailgun’s API is changed, the tests will start returning false-positive 
results.

Mocking all invocations ATM will require someone to sit and watch for any 
changes to Nailgun API and update mocks.

Basically I stand for simplification of unit testing in python-fuelclient so 
standard python-jobs will be able to run them. However, two things should be 
done in order to do painless mocking of API calls:

 - Nailgun should have a precisely documented API, probably in machine-readable 
format.
 - There should be a precisely defined mechanism of changing and versioning 
Nailgun API.

Before that is done I see no point in mocking API calls in unit-tests.


- romcheg

> 9 лют. 2015 о 14:03 Sebastian Kalinowski <skalinow...@mirantis.com> 
> написав(ла):
> 
> Hi,
> 
> 2015-02-09 13:57 GMT+01:00 Nikolay Markov <nmar...@mirantis.com>:
> They say, there is some kind of "holywar" around the topic on if
> fuel-client tests should rely on working Nailgun API without mocking
> it.
> 
> Could you point us where was such "hollywar" was, so we could get some 
> background on the topic?
> 
>  Best,
> Sebastian
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to