My aim is to force the docker build to fail if the Unittests have not all passed. I'm using the following line in my DockerFile:
RUN python3 -m unittest discover test
My unit tests are in classes in the test directory. The tests are run, but a failed test does not result in a failed build.
I know that a non-zero exit code is how to stop a build, but that does not seem to occur using this command.