appsody / controller

Appsody controller running in the development container. This repo will be archived soon.
https://appsody.dev
Apache License 2.0
2 stars 12 forks source link

error code lost during appsody test #42

Closed tnixa closed 4 years ago

tnixa commented 4 years ago

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:

  1. edit incubator/python-flask/image/project/test/apptests.py and remove the : from line 4: class ServerTestCase(unittest.TestCase)
  2. 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
  3. 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
  4. 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
  5. 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):

If applicable please specify: