pazuzu-io/pazuzu

Run test spec in build

rdllopes opened this issue · 1 comments

Once build command is implemented, it will be possible to execute test spec with docker image. Some code is already there to start, execute command and stop docker image. Those things could be exposed.

I found a couple of things to do here:

  • Install git on base image: The bats installation currently relies on git. However, the ubuntu 14.04 image we currently use as base does not come with git installed. So it's necessary to apt-get -y git to solve this. This should be very straightforward
  • Copy test.bats file into the Container: This was the simplest way I could find to actually run the tests on a Pazuzu-generated container. I see no real issue with this since the test.bats file is likely to be a small text file. Implementing this is a matter of adding a line with COPY test.bats /test.bats to the Dockerfile template

I found out about these issues and tested both my ideas for solution by creating a simple Dockerfile using the 'java' feature and modifying it until I was able to actually run the bats in it.