[openstack-dev] [nova][placement] Add API Sample tests for Placement APIs

Rochelle Grober rochelle.grober at huawei.com
Wed Jun 21 21:28:31 UTC 2017

> From: Matt 
> On 6/21/2017 7:04 AM, Shewale, Bhagyashri wrote:
> > I  would like to write functional tests to check the exact req/resp
> > for each placement API for all supported versions similar
> >
> > to what is already done for other APIs under
> > nova/tests/functional/api_sample_tests/api_samples/*.
> >
> > These request/response json samples can be used by the
> > api.openstack.org and in the manuals.
> >
> > There are already functional tests written for placement APIs under
> > nova/tests/functional/api/openstack/placement,
> >
> > but these tests doesn’t check the entire HTTP response for each API
> > for all supported versions.
> >
> > I think adding such functional tests for checking response for each
> > placement API would be beneficial to the project.
> >
> > If there is an interest to create such functional tests, I can file a
> > new blueprint for this activity.
> >
> This has come up before and we don't want to use the same functional API
> samples infrastructure for generating API samples for the placement API.
> The functional API samples tests are confusing and a steep learning curve for
> new contributors (and even long time old tooth contributors still get
> confused by them).

I second that you talk with Chris Dent (mentioned below), but I also want to encourage you to write tests.  Write API tests that demonstrate *exactly* what is allowed and not allowed and verify that whether the api call is constructed correctly or not, that the responses are appropriate and correct.  By writing these new/extra/improved tests, the Interop guidelines can use these tests to improve interop expectations across clouds.  Plus, operators will be able to more quickly identify what the problem is when the tests demonstrate the problem-response patterns.  And, like you said, knowing what to expect makes documenting expected behaviors, for both correct and incorrect uses, much more straightforward.  Details are very important when tracking down issues based on the responses logged.

I want to encourage you to work with Chris to help expand our tests and their specificity and their extent.


--Rocky (with my interop, QA and ops hats on)

> Talk with Chris Dent about ideas here for API samples with placement.
> He's talked about building something into the gabbi library for this, but I don't
> know if that's being worked on or not.
> Chris is also on vacation for a couple of weeks, just FYI.
> --
> Thanks,
> Matt
> __________________________________________________________
> ________________
> 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

More information about the OpenStack-dev mailing list