kbase / kb_sdk

Build and test new apps for the KBase platform
http://kbase.github.io/kb_sdk_docs
MIT License
27 stars 32 forks source link

TASK-935: Callback server failhard #260

Closed arfathpasha closed 7 years ago

arfathpasha commented 7 years ago

Note: this PR is linked to corresponding PR in Jars repo containing new jar dependencies

sychan commented 7 years ago

@arfathpasha Can you merge the current develop branch back into your branch and see if it passes the tests?

arfathpasha commented 7 years ago

@sychan I get the following errors (my jars dir is up-to-date).

Python tests:

FAIL: test_bad_url (py_module_tests.test_auth_client.TestAuth)

Traceback (most recent call last): File "/home/apasha/dev/temp/kb_sdk/test_scripts/py_module_tests/test_auth_client.py", line 79, in test_bad_url self.assertIn('not known', str(context.exception.message)) AssertionError: 'not known' not found in "HTTPSConnectionPool(host='thisisasuperfakeurlihope.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f20135f2c90>: Failed to establish a new connection: [Errno 110] Connection timed out',))"

Java tests: (see attached out.txt for test log) out.txt

Test us.kbase.mobu.initializer.test.AsyncDockerTest FAILED Test us.kbase.mobu.initializer.test.DynamicServiceTest FAILED Test us.kbase.scripts.test.TypeGeneratorTest FAILED

MrCreosote commented 7 years ago

When I run the tests I get this:

~/localgit/githubusers/arfathpasha/kb_sdk$ git checkout callback_server_failhard
M   submodules/auth
M   test_scripts/test.cfg
Branch callback_server_failhard set up to track remote branch callback_server_failhard from origin.
Switched to a new branch 'callback_server_failhard'
~/localgit/githubusers/arfathpasha/kb_sdk$ make test; python -c "import yagmail; yagmail.SMTP('gavinaprice', oauth2_file='~/.gavinaprice_gmail_oauth2_creds.json').send(subject='test done')"
git submodule init
git submodule update
cp submodules_hacks/AuthConstants.pm submodules/auth/Bio-KBase-Auth/lib/Bio/KBase/
Running unit tests
nose2 -s test_scripts/py_module_tests -t src/java/us/kbase/templates
....Loading test config from /home/crusherofheads/localgit/githubusers/arfathpasha/kb_sdk/test_scripts/test.cfg
E.E
======================================================================
ERROR: test_bad_token (py_module_tests.test_auth_client.TestAuth)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/crusherofheads/localgit/githubusers/arfathpasha/kb_sdk/test_scripts/py_module_tests/test_auth_client.py", line 72, in test_bad_token
    'unpack')
  File "/home/crusherofheads/localgit/githubusers/arfathpasha/kb_sdk/test_scripts/py_module_tests/test_auth_client.py", line 85, in fail_get_user
    self.kba.get_user(token)
  File "/home/crusherofheads/localgit/githubusers/arfathpasha/kb_sdk/src/java/us/kbase/templates/authclient.py", line 87, in get_user
    err['error_msg']))
KeyError: 'error_msg'

======================================================================
ERROR: test_get_user (py_module_tests.test_auth_client.TestAuth)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/crusherofheads/localgit/githubusers/arfathpasha/kb_sdk/test_scripts/py_module_tests/test_auth_client.py", line 64, in test_get_user
    self.assertEqual(kba2.get_user(self.token1), self.user1)
  File "/home/crusherofheads/localgit/githubusers/arfathpasha/kb_sdk/src/java/us/kbase/templates/authclient.py", line 87, in get_user
    err['error_msg']))
KeyError: 'error_msg'

----------------------------------------------------------------------
Ran 7 tests in 2.484s

I suspect @arfathpasha needs to merge the test fixes I made into his fork/branch.

arfathpasha commented 7 years ago

@MrCreosote I have rebased with develop branch. The python fixes should work now.

MrCreosote commented 7 years ago

this PR is now showing a ton of changes unrelated to the callback server - can you fix?