Code review comment for lp:~termie/nova/move_tests

Revision history for this message
termie (termie) wrote :

> To elaborate a bit: Tests are code. It should be just as pretty, neat, and
> wonderful as any other piece of code.
>

I agree on the cleanliness, but that has little to do with where the tests live.

> I want them to be installed so that people can run tests on the installed code
> as well. There might be environmental things that factor into the tests, so I
> think it's very valuable to be able to tell people who report bugs to run the
> test suite, for instance.

I think this is a bogus statement, I don't think anybody has ever convinced a 'regular' user to run a test suite and I think any developer who is going to go through the trouble is fine downloading a package or checkout (or more likely going back to the package or checkout they've already downloaded and left in a folder somewhere) to get at the tests.

>
> In fact, I think I'd much rather move the tests for e.g. the objectstore into
> nova/objectstore/tests. It feels perfectly natural to me that tests pertaining
> to nova.objectstore are in nova.objectstore.tests.

That to me feels obscene, my opinion on subdirectories/submodules is that they exist to hide things, putting tests further down a hole only makes you forget it is there and makes it that much more difficult to keep track of and to get to when you are changing something: making things separate that have no need to be separate for the sake of having little bins to put everything in just means more bins to sort through when you need to find something.

Test-code is self-similar, much more so than it is similar to, say, objectstore's code, and more than it is to anything else in the nova directory. Test code should generally look the same as other test code and, I think, should be thought of as an entity outside of nova twisting the switches and pulling the nobs to make sure all the lights come on at the right times.

In general I don't want people thinking that the test code is part of the nova install, I don't want people referencing the test code from their code, it is stuff that should never be run on a production machine and has no place there. We also already have 'smoketests' that are outside the repo, so there is some precedent.

« Back to merge proposal