Kitware / minerva

Minerva: client/server/services for analysis and visualization
Apache License 2.0
36 stars 14 forks source link

WIP test of web_client_test #354

Closed mgrauer closed 8 years ago

mgrauer commented 8 years ago

Not to be merged, a test of web_client_test which is failing for me locally

mgrauer commented 8 years ago

This PR is (so far) just for discussion.

@kotfic Asked me a question about this, because he was having trouble with web_client_test in his local dev environment, as was @dorukozturk in #353.

I reproduced this problem in my local dev env, where the error was "ImportError: No module named plugin_tests".

I noticed when I ran the test that the PYTHONPATH was empty

152: Test command: /usr/bin/python2.7 "-m" "unittest" "-v" "plugin_tests.web_client_test" 152: Environment variables: 152: PYTHONPATH= 152: SPEC_FILE=/home/vagrant/girder/plugins/minerva/plugin_tests/client/minervaSpec.js 152: ASSETSTORE_TYPE=filesystem 152: WEB_SECURITY=true 152: ENABLED_PLUGINS=gravatar jobs romanesco minerva 152: PLUGIN_DIRS= 152: GIRDER_TEST_DB=mongodb://localhost:27017/girder_test_web_client_minerva 152: GIRDER_TEST_ASSETSTORE=web_client_minerva 152: GIRDER_PORT=30022 152: BASEURL=/static/built/testEnvMinerva.html 152: COVERAGE_FILE=/home/vagrant/girder-build/js_coverage/minerva.cvg

@kotfic do you see an empty PYTHONPATH in the test when you run it?

In travis we set the PYTHONPATH in the ENV before running tests, which explains why the tests pass there.

PYTHONPATH="$PYTHONPATH:$GIRDER_SOURCE_DIR/plugins/minerva"

I was also able to get the test to run by setting a PYTHONPATH value in my local ENV to include the path to Minerva. It failed for me locally with ERROR: ReferenceError: Can't find variable: mat4, but I'll save that for another day as I got past the initial problem.

I don't remember explicitly setting the PYTHONPATH before in my ENV locally to get this test to pass.

@jbeezley Do you have anything to add here? Do you expect to have to set your PYTHONPATH in your local dev env for the web_client_test to pass, or am I missing something else?

jbeezley commented 8 years ago

Yes, you'll have to set the PYTHONPATH with the minerva directory is in it. The only way to avoid that would be to put the test module inside the minerva python package.

aashish24 commented 8 years ago

@mgrauer do we need further action on this branch?

mgrauer commented 8 years ago

No, it was for information gathering. I'll close it.