Hi Brad, I think i know what the issue is. In the quantum.conf.test file change the last line from:
paste.app_factory = tests.unit.test_extensions:app_factory to paste.app_factory = *quantum*.tests.unit.test_extensions:app_factory All the tests should pass now. Why was only one test failing? Ideally, all the extension tests should have been failing. In fact, when i ran them on my machine, all of them were failing. But it was a puzzle why they werent failing on your machine. If you look at the stack trace, there is a controller called "openstack.common.wsgi.Resource". This could only happen if a openstack common controller was loaded. Quantum doesnt use openstack common, but if you have installed openstack.common from source ( probably for melange :-) ) the "tests.unit.test_extensions:app_factory" would have picked up the openstack common controllers as there was a similar app_factory in the openstack common tests. If i install openstack common in the virtual environment of quantum, i am able to replicate your single test failure. Lesson for me, qualify modules with their app names everywhere to avoid such silly confusions. Thanks, Rajaram On Mon, Nov 7, 2011 at 12:21 PM, Brad Hall <b...@nicira.com> wrote: > Hey Netstackers, > > We're trying to get all the tests working again with the current set > of packaging changes but there is still one more test that doesn't > want to comply. Maybe someone that is more familiar with the > extensions/wsgi stuff can look at it? > > The packaging changes are here:https://review.openstack.org/#change,1094 > The patch that fixes most of the tests is attached. If you want to > run the tests just: 1) Check out the quantum trunk, 2) Cherry-pick the > packaging changes above from the review, and 3) Apply the attached > patch. > > Here is the failing output: > > ====================================================================== > ERROR: test_edit_previously_uneditable_field > (lib.quantum.tests.unit.test_extensions.RequestExtensionTest) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/home/bhall/src/git/quantum-packaging/server/lib/quantum/tests/unit/test_extensions.py", > line 281, in test_edit_previously_uneditable_field > {'uneditable': "new_value"}) > File "/usr/local/lib/python2.7/dist-packages/webtest/__init__.py", > line 807, in put > content_type=content_type) > File "/usr/local/lib/python2.7/dist-packages/webtest/__init__.py", > line 769, in _gen_request > expect_errors=expect_errors) > File "/usr/local/lib/python2.7/dist-packages/webtest/__init__.py", > line 974, in do_request > self._check_status(status, res) > File "/usr/local/lib/python2.7/dist-packages/webtest/__init__.py", > line 1009, in _check_status > res.body)) > AppError: Bad response: 415 Unsupported Media Type (not 200 OK or 3xx > redirect for http://localhost/dummy_resources/1) > 415 Unsupported Media Type > > Unsupported Content-Type > > > -------------------- >> begin captured logging << -------------------- > routes.middleware: DEBUG: Initialized with method overriding = True, > and path info altering = True > routes.middleware: DEBUG: Matched PUT /dummy_resources/1 > routes.middleware: DEBUG: Route path: '/dummy_resources/:(id)', > defaults: {'action': u'update', 'controller': > <openstack.common.wsgi.Resource object at 0x8ea2090>} > routes.middleware: DEBUG: Match dict: {'action': u'update', > 'controller': <openstack.common.wsgi.Resource object at 0x8ea2090>, > 'id': u'1'} > wsgi: DEBUG: Unrecognized Content-Type provided in request > --------------------- >> end captured logging << --------------------- > > ---------------------------------------------------------------------- > Ran 234 tests in 2.998s > > FAILED (errors=1) > > Thanks, > Brad > > -- > Mailing list: https://launchpad.net/~netstack > Post to : netstack@lists.launchpad.net > Unsubscribe : https://launchpad.net/~netstack > More help : https://help.launchpad.net/ListHelp > >
-- Mailing list: https://launchpad.net/~netstack Post to : netstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~netstack More help : https://help.launchpad.net/ListHelp