[Kimchi-devel] [PATCH V9 0/9] Issue #342: load i18n.html of the plugin

Aline Manera alinefm at linux.vnet.ibm.com
Sun Jun 15 12:02:51 UTC 2014


The tests are failing:

[15/Jun/2014:08:58:21] ENGINE Bus STARTING
[15/Jun/2014:08:58:21] ENGINE Started monitor thread 'Autoreloader'.
[15/Jun/2014:08:58:21] ENGINE Started monitor thread '_TimeoutMonitor'.
[15/Jun/2014:08:58:21] ENGINE Serving on 127.0.0.1:51118
[15/Jun/2014:08:58:21] ENGINE Bus STARTED
[15/Jun/2014:08:58:21] ENGINE Started monitor thread 'Session cleanup'.
[15/Jun/2014:08:58:23]  Traceback (most recent call last):
   File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 
102, in run
     hook()
   File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 
62, in __call__
     return self.callback(**self.kwargs)
   File "/home/alinefm/kimchi/src/kimchi/auth.py", line 247, in kimchiauth
     if check_auth_httpba():
   File "/home/alinefm/kimchi/src/kimchi/auth.py", line 194, in 
check_auth_httpba
     return login(username, password)
   File "/home/alinefm/kimchi/src/kimchi/auth.py", line 207, in login
     raise OperationFailed("KCHAUTH0001E", msg_args)
OperationFailed: KCHAUTH0001E: KCHAUTH0001E

[15/Jun/2014:08:58:23] HTTP
Request Headers:
   AUTHORIZATION: Basic YWRtaW46bGV0bWVpbiE=
   Content-Length: 43
   HOST: 127.0.0.1
   CONNECTION: close
   Remote-Addr: 127.0.0.1
   X-REAL-IP: 127.0.0.1
   ACCEPT: application/json
   X-FORWARDED-FOR: 127.0.0.1
   Content-Type: application/json
   ACCEPT-ENCODING: identity
[15/Jun/2014:08:58:23] HTTP Traceback (most recent call last):
   File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 
653, in respond
     self.hooks.run('before_handler')
   File "/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 
112, in run
     raise exc
OperationFailed: KCHAUTH0001E: KCHAUTH0001E

127.0.0.1 - - [15/Jun/2014:08:58:23] "POST /plugins/sample/rectangles 
HTTP/1.0" 500 1105 "" ""
F[15/Jun/2014:08:58:23] ENGINE Bus STOPPING
[15/Jun/2014:08:58:23] ENGINE HTTP Server 
cherrypy._cpwsgi_server.CPWSGIServer(('127.0.0.1', 51118)) shut down
[15/Jun/2014:08:58:23] ENGINE Stopped thread '_TimeoutMonitor'.
[15/Jun/2014:08:58:23] ENGINE Stopped thread 'Session cleanup'.
[15/Jun/2014:08:58:23] ENGINE Stopped thread 'Autoreloader'.
[15/Jun/2014:08:58:23] ENGINE Bus STOPPED
[15/Jun/2014:08:58:23] ENGINE Bus EXITING
[15/Jun/2014:08:58:23] ENGINE Waiting for child threads to terminate...
[15/Jun/2014:08:58:23] ENGINE Waiting for thread MainThread.
[15/Jun/2014:08:58:23] ENGINE Bus EXITED

======================================================================
FAIL: test_rectangles (test_plugin.PluginTests)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "test_plugin.py", line 91, in test_rectangles
     self._create_rectangle_and_assert('small', 10, 8)
   File "test_plugin.py", line 76, in _create_rectangle_and_assert
     self.assertEquals(201, resp.status)
AssertionError: 201 != 500

----------------------------------------------------------------------
Ran 1 test in 2.550s

FAILED (failures=1)

It is because you protected the plugins URLs:

[/description]
tools.kimchiauth.on = True

[/rectangles]
tools.kimchiauth.on = True
tools.kimchiauth.admin_methods = ['POST', 'PUT']

[/circles]
tools.kimchiauth.on = True
tools.kimchiauth.admin_methods = ['POST', 'PUT']

So to tests work well you need to run patch_auth() in setupModule() - 
the same way we did for test_rest.py






More information about the Kimchi-devel mailing list