docs: Include Docker related information in CONTRIBUTING (#321)

This commit is contained in:
Hofer-Julian 2019-09-09 18:10:45 +02:00 committed by Kevin Song
parent c67734f46c
commit b2dcdaae5f
1 changed files with 4 additions and 1 deletions

View File

@ -76,7 +76,10 @@ The previous point should be emphasized: even seemingly innocuous ideas like "if
Acceptance tests are located in the [`tests/`](tests) directory and are also written using the built-in Rust testing library.
Acceptance tests should test full modules or the entire prompt. All integration tests expecting the testing environment to have preexisting state or making permanent changes to the filesystem should have the `#[ignore]` attribute. These tests will be run in a Docker container, by running the included [`./integration_test`](integration_test) script. All tests that don't depend on any preexisting state will be run alongside the unit tests with `cargo test`.
Acceptance tests should test full modules or the entire prompt. All integration tests expecting the testing environment to have preexisting state or making permanent changes to the filesystem should have the `#[ignore]` attribute. All tests that don't depend on any preexisting state will be run alongside the unit tests with `cargo test`.
Acceptance tests require Docker to be installed, as they are run inside a Docker container. This can be done as described in the official [documentation](https://docs.docker.com/install/). The acceptance tests can then be executed by running the included [`./integration_test`](integration_test) script. It might be necessary to run [`./integration_test`](integration_test) with `sudo` if your user is not part of the `docker` group.
For tests that depend on having preexisting state, whatever needed state will have to be added to the project's Dockerfile ([`tests/Dockerfile`](tests/Dockerfile)) as well as the project's Azure Pipelines configuration ([`azure-pipelines.yml`](azure-pipelines.yml)).