exercism / php-test-runner

GNU Affero General Public License v3.0
0 stars 6 forks source link

Replace PHP smoke tests with Docker-based smoke tests #83

Closed ErikSchierboom closed 11 months ago

ErikSchierboom commented 11 months ago

This PR adds smoke tests for some common scenarios.

The goal of the smoke tests is to increase confidence that the Docker image that is produced works as intended. The repo contains other tests, which are great, but what this PR adds is that it runs an integration test using the following setup:

  1. Build the Docker image
  2. Run the Docker image with the tests directory mapped into the container
  3. Run the Docker image's normal entrypoint (bin/run.sh) on each of the test cases defined in the tests directory
  4. Verify that the output of those test runs matches the expected output (which is stored inside the tests directories

If successful, we then know that:

  1. The Docker image can be built successfully
  2. The bin/run.sh entrypoint inside the Docker image is setup correctly
  3. The test runner generates the correct output

There were some PHP smoke tests too, but this new approach is more comprehensive I feek.