adsabs / adsws

ADS web services
Other
2 stars 15 forks source link

travis reports 'build passing' but it is actually failed #24

Closed romanchyla closed 9 years ago

romanchyla commented 9 years ago

that applies to the latest master - i'm seeing the same problems that you saw on travis:

======================================================================================= test session starts ======================================================================================== platform linux2 -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4 plugins: cache, pep8, cov collected 39 items

adsws/modules/classic/testsuite/test_classic_user.py ...xx. adsws/modules/oauth2server/testsuite/test_provider.py .......... adsws/tests/test_api.py FF adsws/tests/test_api_bumblebee.py .. adsws/tests/test_api_limits.py . adsws/tests/test_api_solr.py .... adsws/tests/test_core_clients.py . adsws/tests/test_factory.py .. adsws/tests/test_frontend_authentication.py ..... adsws/tests/test_frontend_authentication_classic_fallback.py ..xx..

============================================================================================= FAILURES ============================================================================================= _____ ApiTestCase.testheaders ____

self =

def test_headers(self):
    current_app.config['CORS_DOMAINS'] = {'http://localhost': 1}

    r = self.client.get('/test', headers=[('Origin', 'http://localhost')])
  self.assertEqual(r.headers.get('Access-Control-Allow-Origin'), 'http://localhost')

E AssertionError: None != 'http://localhost'

adsws/tests/test_api.py:59: AssertionError --------------------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------------------- ERROR:adsws.api: Request: GET /test IP: None Agent: None | None None Raw Agent:
Oauth2: None

Traceback (most recent call last): File "/dvt/workspace/adsws/python/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/dvt/workspace/adsws/python/local/lib/python2.7/site-packages/flask/app.py", line 1470, in full_dispatch_request self.try_trigger_before_first_request_functions() File "/dvt/workspace/adsws/python/local/lib/python2.7/site-packages/flask/app.py", line 1497, in try_trigger_before_first_request_functions func() File "/dvt/workspace/adsws/adsws/modules/oauth2server/views/server.py", line 52, in setup_app bind_cache_grant(current_app, oauth2, OAuthUserProxy.get_current_user) File "/dvt/workspace/adsws/python/src/flask-oauthlib/flask_oauthlib/contrib/oauth2.py", line 91, in bind_cache_grant cache = Cache(app, config_prefix) File "/dvt/workspace/adsws/python/src/flask-oauthlib/flask_oauthlib/contrib/cache.py", line 18, in init self.cache = getattr(self, cache_type)(kwargs) File "/dvt/workspace/adsws/python/src/flask-oauthlib/flask_oauthlib/contrib/cache.py", line 76, in _redis return RedisCache(kwargs) File "/dvt/workspace/adsws/python/local/lib/python2.7/site-packages/werkzeug/contrib/cache.py", line 486, in init raise RuntimeError('no redis module found') RuntimeError: no redis module found _____ ApiTestCase.testoptions ____

self =

def test_options(self):
    r = self.client.options('/gp', headers=[
                    ('Origin', 'http://localhost'),
                    ('Access-Control-Request-Headers', 'accept, x-bb-api-client-version, content-type')])
  self.assertEqual(r.headers.get('Access-Control-Allow-Methods'), 'GET, OPTIONS, POST')

E AssertionError: None != 'GET, OPTIONS, POST'

adsws/tests/test_api.py:69: AssertionError --------------------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------------------- ERROR:adsws.api: Request: OPTIONS /gp IP: None Agent: None | None None Raw Agent:
Oauth2: None

Traceback (most recent call last): File "/dvt/workspace/adsws/python/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/dvt/workspace/adsws/python/local/lib/python2.7/site-packages/flask/app.py", line 1470, in full_dispatch_request self.try_trigger_before_first_request_functions() File "/dvt/workspace/adsws/python/local/lib/python2.7/site-packages/flask/app.py", line 1497, in try_trigger_before_first_request_functions func() File "/dvt/workspace/adsws/adsws/modules/oauth2server/views/server.py", line 52, in setup_app bind_cache_grant(current_app, oauth2, OAuthUserProxy.get_current_user) File "/dvt/workspace/adsws/python/src/flask-oauthlib/flask_oauthlib/contrib/oauth2.py", line 91, in bind_cache_grant cache = Cache(app, config_prefix) File "/dvt/workspace/adsws/python/src/flask-oauthlib/flask_oauthlib/contrib/cache.py", line 18, in init self.cache = getattr(self, cache_type)(kwargs) File "/dvt/workspace/adsws/python/src/flask-oauthlib/flask_oauthlib/contrib/cache.py", line 76, in _redis return RedisCache(kwargs) File "/dvt/workspace/adsws/python/local/lib/python2.7/site-packages/werkzeug/contrib/cache.py", line 486, in init raise RuntimeError('no redis module found') RuntimeError: no redis module found

vsudilov commented 9 years ago

Which build? c536141aecffae6525323272c2fb581b3cfa4ac6 (master) passes.

8c9415ed41b4f712075e53981c28a (vss) is expected to fail, as noted in the commit message.

romanchyla commented 9 years ago

i see, i didn't notice it was a different branch - i got errors on a branch that i based on latest master, probably i have to clone again (from public adsws)