On Sun, Oct 16, 2016, at 07:11 AM, Rikimaru Honjo wrote:
> Hi all,
> I have a question about unit tests of nova.
> (I found this question when I fixed a bug about shelve.)
> "nova.tests.unit.compute.test_shelve.ShelveComputeAPITestCase" has
> test cases for "nova.compute.api.API.shelve()/unshelve()".
> But "nova.tests.unit.compute.test_compute_api._ComputeAPIUnitTestMixIn"
> also has test cases for same methods.
> Is their purpose duplicated?
> And, can I organize them if their purpose is duplicated?
I just looked at them briefly and they're not exactly duplicates. It
appears that test_shelve.py has more functional tests and
test_compute_api.py is more unit tests. But it would be nice to have
them all in the same place.
> FYI, I think that we should consolidate them into
> Because it is inherited to some test classes.
Personally I would prefer consolidating them into test_shelve.py because
_ComputeAPIUnitTestMixin is a giant class and it can be hard to discover
where something is tested. I like having the features tested in a
dedicated test file.
> : https://bugs.launchpad.net/nova/+bug/1588657
> Best regards,
> Rikimaru Honjo
> OpenStack Development Mailing List (not for usage questions)
OpenStack Development Mailing List (not for usage questions)