bremnes / docker-test-in-dockerfile

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-test-in-dockerfile Build status

.net core project to explore the possibility of running tests as a part of docker build process. By doing it this way there will be no dependencies to specific test runner(s) on the build server, only Docker.

Since there's currently no Docker support for exporting files out from a multi-stage docker build and/or image, the build script places the test results into the container and then later creates a container in which we can copy it from.

Dockerfile

Example Dockerfile can be located at src/CalculatorWeb/Dockerfile

Trigger failure

This example is a simple .net core project consisting of a web api project and a separate project for unit tests. For triggering the tests to fail, add --build-arg FAILTEST=true to the docker build command. This will pass an environment variable to the unit test which will then promptly fail.

TODO

  • Export test results out from build process.

About


Languages

Language:C# 84.2%Language:Dockerfile 15.8%