Describe the bug
I'm using the python-flask stack and I changed its test file so it would cause appsody test to fail. When I do this i get the expected error message but the return code is 0.
To Reproduce
Steps to reproduce the behavior:
edit incubator/python-flask/image/project/test/apptests.py and remove the : from line 4: class ServerTestCase(unittest.TestCase)
from incubator/python-flask run appsody stack validate which will do a package and a test and you should see log messages that the test had problems but was still marked as passed
to isolate the issue you can do an appsody init dev-local/python-flask and then appsody test --no-watcher and once it completes do an echo $? which will return a 0
to isolate the issue further you can run the docker command the test runs which is docker run --rm -p 5678:5678 -p 8080:8080 --name python-dev -v /Users/tnixa/appsody/projects101019/python/:/project/userapp -v python-deps:/project/deps -v /Users/tnixa/.appsody/appsody-controller:/appsody/appsody-controller -t --entrypoint /appsody/appsody-controller dev.local/python-flask:SNAPSHOT --mode=test --no-watcher and when this completes do an echo $? which will return a 0
to isolate the issue further you can do and appsody extract and then cd ~/.appsody/extract/<project name> and then run python -m unittest discover -s test -p *.py and then run echo $? which will return 1
Environment Details (please complete the following information):
Describe the bug I'm using the python-flask stack and I changed its test file so it would cause
appsody test
to fail. When I do this i get the expected error message but the return code is 0.To Reproduce Steps to reproduce the behavior:
incubator/python-flask/image/project/test/apptests.py
and remove the:
from line 4:class ServerTestCase(unittest.TestCase)
incubator/python-flask
runappsody stack validate
which will do apackage
and atest
and you should see log messages that thetest
had problems but was still marked aspassed
appsody init dev-local/python-flask
and thenappsody test --no-watcher
and once it completes do anecho $?
which will return a 0docker run --rm -p 5678:5678 -p 8080:8080 --name python-dev -v /Users/tnixa/appsody/projects101019/python/:/project/userapp -v python-deps:/project/deps -v /Users/tnixa/.appsody/appsody-controller:/appsody/appsody-controller -t --entrypoint /appsody/appsody-controller dev.local/python-flask:SNAPSHOT --mode=test --no-watcher
and when this completes do anecho $?
which will return a 0appsody extract
and thencd ~/.appsody/extract/<project name>
and then runpython -m unittest discover -s test -p *.py
and then runecho $?
which will return 1Environment Details (please complete the following information):
If applicable please specify: