forked from cms-dev/cms
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve documentation on how to run tests
Also update gitignore / dockerignore
- Loading branch information
Showing
5 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
Dockerfile | ||
docker-compose*.yml | ||
.vagrant/ | ||
codecov/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ cache/ | |
lib/ | ||
log/ | ||
.vagrant/ | ||
codecov/ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Docker image | ||
************ | ||
|
||
We provide a docker image (defined in :gh_blob:`Dockerfile`) that can be used to | ||
easily get an instance of CMS running locally with all the necessary | ||
dependencies. We also provide a :gh_blob:`docker-compose.test.yml` files that | ||
uses said docker image to run the tests. | ||
|
||
.. _docker-image_running-tests: | ||
|
||
Running tests | ||
============= | ||
|
||
First you need to build the image: | ||
|
||
.. sourcecode:: bash | ||
|
||
sudo docker-compose -f docker-compose.test.yml build cms_test | ||
|
||
Then you can run the tests: | ||
|
||
.. sourcecode:: bash | ||
|
||
sudo docker-compose -f docker-compose.test.yml run --rm cms_test | ||
|
||
This command will create a ``cms_test_db`` container for the database which | ||
**will not** be automatically deleted, and a ``cms_test`` container for CMS | ||
which will be automatically deleted (because of the ``--rm`` flag) upon exiting. | ||
|
||
To delete the ``cms_test_db`` container after testing you can run: | ||
|
||
.. sourcecode:: bash | ||
|
||
sudo docker rm -f cms_test_db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters