Skip to content

Commit

Permalink
Add instructions on running unit tests, docker checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
TysonAndre committed Jul 4, 2021
1 parent c26092e commit 93f3dd9
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions tests/README.rst
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]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`.

0 comments on commit 93f3dd9

Please sign in to comment.