I'm copying openstack-dev for posterity and because smarter people than me hang out there and might be able to answer any questions I can't. :-)
There are a couple of other dependencies you will need to install before the test cases will run successfully (I always forget because my development environments already have them). On Ubuntu you will need to install at least libxslt-dev libmysqlclient-dev and the Fedora equivalents would be libxslt-devel mariadb-devel. That should take care of your first problem.
For the second problem I would double-check that the test is taking the code path you expect. A lot of Nova code is called from multiple places, so it's possible it is not getting to your new code in the way you expect. It looks like the dependency is set up correctly so it should be taking into account the first change. Being able to run tests locally should help with this. :-)
-Ben
On 2013-10-09 11:59, Michael Bright wrote:
Thanks Ben,
I had tried running run_tests.sh this morning before doing my first git review but there was an error in the setup - so I just relied on my own testing.
I got the same thing just now with tox:
sh: 1: mysql_config: not found
I tried putting a symlink as suggested somewhere on StackOverfow but this wasn't have been OpenStack/DevStack specific.
I'll shoot off a question about this on the "Ask question" page.
However, I'd really like your advice on git-review.
2013-10-09 15:14:21.972 | Traceback (most recent call last):
2013-10-09 15:14:21.972 | File "nova/tests/api/openstack/compute/plugins/v3/test_servers.py", line 2256, in test_create_instance_above_quota_ram
2013-10-09 15:14:21.973 | self._do_test_create_instance_above_quota('ram', 2048, 10 * 1024, msg)
2013-10-09 15:14:21.973 | File "nova/tests/api/openstack/compute/plugins/v3/test_servers.py", line 2243, in _do_test_create_instance_above_quota
2013-10-09 15:14:21.973 | server = self.controller.create(self.req, self.body).obj['server']
2013-10-09 15:14:21.974 | File "nova/api/openstack/compute/plugins/v3/servers.py", line 799, in create
2013-10-09 15:14:21.974 | **create_kwargs)
2013-10-09 15:14:21.974 | File "nova/hooks.py", line 105, in inner
2013-10-09 15:14:21.974 | rv = f(*args, **kwargs)
2013-10-09 15:14:21.975 | File "nova/compute/api.py", line 1217, in create
2013-10-09 15:14:21.975 | legacy_bdm=legacy_bdm)
2013-10-09 15:14:21.975 | File "nova/compute/api.py", line 866, in _create_instance
2013-10-09 15:14:21.975 | block_device_mapping)
2013-10-09 15:14:21.975 | File "nova/compute/api.py", line 742, in _provision_instances
2013-10-09 15:14:21.976 | context, instance_type, min_count, max_count)
2013-10-09 15:14:21.976 | File "nova/compute/api.py", line 333, in _check_num_instances_quota
2013-10-09 15:14:21.976 | headroom = exc.kwargs['headroom']
2013-10-09 15:14:21.976 | KeyError: 'headroom'
On 9 October 2013 17:57, Ben Nemec (Code Review) <[email protected]> wrote:
Ben Nemec has posted comments on this change.
Change subject: Moved headroom calculations into quota_reserve and modified headroom calculations to take into account -ve quota limits (unlimited) on cores and ram. ......................................................................
Patch Set 2:
No problem, we all have to start somewhere. :-)
Also, you can run the unit tests locally by just running "tox" in the root of the Nova source code. You might have to install tox (I recommend using pip install to make sure you get the latest version), but after that it should take care of everything.