Skip to content

Commit

Permalink
Add requirements.txt for smoke tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjerdonek committed Aug 16, 2017
1 parent 905f451 commit 5bad623
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
17 changes: 12 additions & 5 deletions test/smoketest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,24 @@ See results in smoketest.*.out, generated like this:
Note: the pytest tests from zerotest are currently unused and disabled.

## Installing Test Dependencies

For now, you'll need to install
[zerotest](https://github.com/jjyr/zerotest)
to run these tests, and/or generate new ones in the same way.

This is mainly tested with python3, but has been seen to work
on python2 also. You will need these libraries for some of the tests:
on python2 also. To install dependencies:

pip install -r requirements.txt

or perhaps the following (or similar) if you have multiple Python
installations.

`pip install zerotest requests`
pip3 install -r requirements.txt

or `pip3 install zerotest requests` (or similar) if you have
multiple Python installations.
Installing inside an isolated
[virtual environment](https://packaging.python.org/tutorials/installing-packages/#creating-virtual-environments)
(aka virtualenv) is the preferred approach.

## Running a smoketest

Expand Down Expand Up @@ -141,7 +148,7 @@ Interim test of captured queries:
Generate raw test script which should work with existing database:

```
zerotest generate --ignore-all-headers server_test.json > server_test_raw.py
zerotest generate --ignore-all-headers server_test.json > server_test_raw.py
sed 's,localhost:8887,localhost:8888,' server_test_raw.py > server_test_raw2.py
```

Expand Down
8 changes: 8 additions & 0 deletions test/smoketest/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# "Abstract" dependencies for the project
#
# The sibling requirements.txt file contains the corresponding concrete /
# pinned dependencies. You can use pip-tools to automatically update
# requirements.txt from this file:
# https://github.com/jazzband/pip-tools
requests
zerotest
18 changes: 18 additions & 0 deletions test/smoketest/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file requirements.txt requirements.in
#
certifi==2017.7.27.1 # via requests
chardet==3.0.4 # via requests
idna==2.6 # via requests
jinja2==2.9.6 # via zerotest
markupsafe==1.0 # via jinja2
py==1.4.34 # via pytest
pytest==3.2.1 # via zerotest
requests==2.18.4
six==1.10.0 # via zerotest
urllib3==1.22 # via requests
werkzeug==0.12.2 # via zerotest
zerotest==1.2.1

0 comments on commit 5bad623

Please sign in to comment.