From c6d01adc36d700133f1f69c58a0e817247f278cb Mon Sep 17 00:00:00 2001 From: Felipe Monteiro Date: Tue, 13 Feb 2018 03:17:26 +0000 Subject: [PATCH] Docs: Update testing documentation Update testing documentation to reflect recent changes in https://review.gerrithub.io/#/c/396751/ Change-Id: I494242b012996c72272f980ed62862bc843ae156 --- doc/source/testing.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/source/testing.rst b/doc/source/testing.rst index 943b723c..0d24b496 100644 --- a/doc/source/testing.rst +++ b/doc/source/testing.rst @@ -45,7 +45,7 @@ variable via ``PIFPAF_URL`` which is referenced by Deckhand's unit test suite. Overview -------- -Unit testing currently uses an in-memory sqlite database. Since Deckhand's +Unit testing currently uses an in-memory sqlite SQLite. Since Deckhand's primary function is to serve as the back-end storage for UCP, the majority of unit tests perform actual database operations. Mocking is used sparingly because Deckhand is a fairly insular application that lives at the bottom @@ -53,18 +53,22 @@ of a very deep stack; Deckhand only communicates with Keystone and Barbican. As such, validating database operations is paramount to correctly testing Deckhand. -To run unit tests using PostgreSQL, execute:: +To run unit tests using SQLite, execute:: $ tox -epy27 $ tox -epy35 -against a py27- or py35-backed environment, respectively. To run individual -unit tests, run:: +against a py27- or py35-backed environment, respectively. + +To run unit tests using PostgreSQL, execute:: + + $ tox -epy27-postgresql + $ tox -epy35-postgresql + +To run individual unit tests, run (for example):: $ tox -e py27 -- deckhand.tests.unit.db.test_revisions -for example. - .. warning:: It is **not** recommended to run postgresql-backed unit tests concurrently.