<tt><font size=2>Sean Dague <sean@dague.net> wrote on 02/21/2014
06:09:18 PM:<br>
> On 02/21/2014 05:28 PM, Clark Boylan wrote:<br>
> > ...<br>
> > I would be wary of relying on devstack to configure your unittest<br>
> > environments. Just like it takes over the node you run it on,
devstack<br>
> > takes full ownership of the repos it clones and will do potentially<br>
> > lossy things like `git reset --hard` when you don't expect it
to. +1<br>
> > to documenting the requirements for unittesting, not sure I would<br>
> > include devstack in that documentation.<br>
> <br>
> Agreed, I never run unit tests in the devstack tree. I run them on
my<br>
> laptop or other non dedicated computers. That's why we do unit tests
in<br>
> virtual envs, they don't need a full environment.<br>
> <br>
> Also many of the unit tests can't be run when openstack services are<br>
> actually running, because they try to bind to ports that openstack<br>
> services use.<br>
> <br>
> It's one of the reasons I've never considered that path a priority
in<br>
> devstack.<br>
> <br>
> -Sean<br>
</font></tt>
<br><tt><font size=2>OK, that's important news to me. I thought DevStack
is the recommended way to run unit tests; I have heard that from other
developers and even read it in something I did not write (I also wrote
it in a few places myself, thinking it was the answer). So the recommended
way to run the unit tests for a project is to git clone that project and
then `tox` in that project's directory, right?</font></tt>
<br>
<br><a href=http://docs.openstack.org/developer/nova/devref/development.environment.html><tt><font size=2>http://docs.openstack.org/developer/nova/devref/development.environment.html</font></tt></a><tt><font size=2>
and </font></tt><a href=https://github.com/openstack/horizon/blob/master/README.rst><tt><font size=2>https://github.com/openstack/horizon/blob/master/README.rst</font></tt></a><tt><font size=2>
say to use run_tests.sh. Over in Heat-land, Angus is leading a campaign
to exterminate run_tests.sh in favor of tox. Am I getting conflicting
answers because of outdated documentation, or differences between projects,
or the fact that a sea-change is in progress, or ... ?</font></tt>
<br>
<br><tt><font size=2>My personal interests right now are centered on Nova
and Heat, but clearly the issues here are not limited to those two projects.</font></tt>
<br>
<br><a href=http://docs.openstack.org/developer/nova/devref/development.environment.html><tt><font size=2>http://docs.openstack.org/developer/nova/devref/development.environment.html</font></tt></a><tt><font size=2>
has several interesting features. It tells me how to set up a development
environment in Linux, and also tells me how to set up a development environment
in MacOS X. Is the latter for real? When I followed those instructions
on my Mac and ran the unit tests I got several failures.</font></tt>
<br>
<br><a href=http://docs.openstack.org/developer/nova/devref/development.environment.html><tt><font size=2>http://docs.openstack.org/developer/nova/devref/development.environment.html</font></tt></a><tt><font size=2>
has long fiddly instructions for setting up a development environment on
Linux; the Mac side is much simpler, leveraging the setup infrastructure
for unit testing --- which is available in Linux too! Why not give
the simple instructions for both platforms?</font></tt>
<br>
<br><tt><font size=2>Is there a greased path for graduating from unit testing
to integration/system tests, or would that be done by submitting my work
for review and then cherry-picking it into a DevStack install?</font></tt>
<br>
<br><tt><font size=2>I am glad to know I am not the only one who finds
it odd that the fix to a unit testing problem is to make DevStack more
flexible. Why was bug 1203680 not fixed by more direct means? Is
it because tox can not do the sort of flexible system package installations
that the DevStack scripting does?</font></tt>
<br>
<br><tt><font size=2>IMHO, we need to either accept the existing fix and
its implications (using DevStack to setup for unit testing) and document
in all the relevant places (which includes the DevStack documentation),
or switch to a different fix.</font></tt>
<br>
<br><tt><font size=2>Regards,</font></tt>
<br><tt><font size=2>Mike</font></tt>