[openstack-dev] [Fuel] fuel-client and Nailgun API

Roman Prykhodchenko me at romcheg.me
Mon Feb 9 13:30:33 UTC 2015


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 <skalinowski at mirantis.com> написав(ла):
> 
> Hi,
> 
> 2015-02-09 13:57 GMT+01:00 Nikolay Markov <nmarkov at 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-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150209/dfa13535/attachment.pgp>


More information about the OpenStack-dev mailing list