forked from twitter/twemproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add instructions on running unit tests, docker checks.
Closes twitter#617
- Loading branch information
1 parent
c26092e
commit 93f3dd9
Showing
1 changed file
with
17 additions
and
7 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 |
---|---|---|
@@ -1,16 +1,19 @@ | ||
Python testing facilities for twemproxy, this test suite is based on https://github.com/idning/redis-mgr | ||
|
||
already add to https://travis-ci.org/idning/twemproxy as travis-ci | ||
Testing in docker | ||
================= | ||
|
||
see https://github.com/idning/twemproxy/blob/travis-ci/travis.sh | ||
The script `test_in_docker.sh` can be run to run all of twemproxy's compiler checks, C unit tests, and this folder's integration tests in docker. | ||
|
||
dockerized tests | ||
================ | ||
REDIS_VERSION=6.2.4 | ||
./test_in_docker.sh $REDIS_VERSION | ||
|
||
usage | ||
===== | ||
|
||
1. install dependency (redis-py must be 3.0 or newer):: | ||
Information on setting up integration tests, running integration tests, and creating new integration tests is below. | ||
|
||
1. install dependencies (redis-py must be 3.0 or newer):: | ||
|
||
pip install nose | ||
pip install git+https://github.com/andymccurdy/[email protected] | ||
|
@@ -39,7 +42,7 @@ usage | |
|
||
OK | ||
|
||
4. add A case:: | ||
4. add a case:: | ||
|
||
cp tests/test_del.py tests/test_xxx.py | ||
vim tests/test_xxx.py | ||
|
@@ -72,6 +75,13 @@ T_LOGFILE: | |
notes | ||
===== | ||
|
||
- After all the tests. you get a core dump because we have a case in test_signal which will send SEGV to nutcracker | ||
- After all of the integration tests, you may get a core dump because we have a case in test_signal which will send SEGV to nutcracker | ||
|
||
- If tests are failing, you may have to `pkill` redis-server, redis-sentinel, or nutcracker | ||
|
||
Unit tests | ||
========== | ||
|
||
See src/test_all.c - unit tests are separate from these integration tests and do not require python. They can be compiled and run with `make check`. | ||
|
||
To view the output of the failing tests, run `cd src; make test_all; ./test_all`. |