[openstack-dev] [nova] Question about redundant API samples tests for microversions
mriedem at linux.vnet.ibm.com
Fri Jun 17 20:16:03 UTC 2016
I was reviewing this today:
And I said to myself, 'self, do we really need to subclass the API
samples functional tests for this microversion given this change doesn't
modify the request/response body, it's only adding paging support?'.
The only change here is listing hypervisors, and being able to page on
those if the microversion is high enough. So the API samples don't
change at all, they are just running against a different microversion.
The same goes for the REST API unit tests really:
I'm not sure if the test subclassing is just done like this for new
microversions because it's convenient or if it's because of regression
testing - knowing that we aren't changing a bunch of other REST methods
in the process, so the subclassed tests aren't testing anything
different from the microversion that came before them.
The thing I don't like about the test subclassing is all of the
redundant testing that goes on, and people might add tests to the parent
class not realizing it's subclassed and thus duplicating test cases with
no functional change.
Am I just having some Friday crazies? Ultimately this doesn't hurt
anything really but thought I'd ask.
More information about the OpenStack-dev