Masayuki Igawa | c268dd6 | 2013-09-18 00:51:05 +0900 | [diff] [blame] | 1 | Tempest Field Guide to Unit tests |
| 2 | ================================= |
Matthew Treinish | 32d3570 | 2013-08-13 11:59:06 -0400 | [diff] [blame] | 3 | |
| 4 | What are these tests? |
| 5 | --------------------- |
| 6 | |
| 7 | Unit tests are the self checks for Tempest. They provide functional |
| 8 | verification and regression checking for the internal components of tempest. |
| 9 | They should be used to just verify that the individual pieces of tempest are |
| 10 | working as expected. They should not require an external service to be running |
| 11 | and should be able to run solely from the tempest tree. |
| 12 | |
| 13 | Why are these tests in tempest? |
| 14 | ------------------------------- |
| 15 | These tests exist to make sure that the mechanisms that we use inside of |
| 16 | tempest to are valid and remain functional. They are only here for self |
| 17 | validation of tempest. |
| 18 | |
| 19 | |
| 20 | Scope of these tests |
| 21 | -------------------- |
| 22 | Unit tests should not require an external service to be running or any extra |
| 23 | configuration to run. Any state that is required for a test should either be |
| 24 | mocked out or created in a temporary test directory. (see test_wrappers.py for |
| 25 | an example of using a temporary test directory) |