Step 3 - run s3-tests
^^^^^^^^^^^^^^^^^^^^^
+.. highlight:: console
+
To run the s3tests suite do the following::
$ ../qa/workunits/rgw/run-s3tests.sh
The Python tests in Ceph repository can be executed on your local machine
using `vstart_runner.py`_. To do that, you'd need `teuthology`_ installed::
- $ git clone https://github.com/ceph/teuthology
- $ cd teuthology/
- $ virtualenv -p python2.7 ./venv
+ $ virtualenv --python=python3 venv
$ source venv/bin/activate
- $ pip install --upgrade pip
- $ pip install -r requirements.txt
- $ python setup.py develop
+ $ pip install 'setuptools >= 12'
+ $ pip install git+https://github.com/ceph/teuthology#egg=teuthology[test]
$ deactivate
-.. note:: The pip command above is pip2, not pip3; run ``pip --version``.
-
The above steps installs teuthology in a virtual environment. Before running
a test locally, build Ceph successfully from the source (refer
:doc:`/install/build-ceph`) and do::
`TestClientRecovery`_ in ``qa/tasks/cephfs/test_client_recovery``, you can
do::
- $ python2 ../qa/tasks/vstart_runner.py tasks.cephfs.test_client_recovery.TestClientRecovery.test_reconnect_timeout
+ $ python ../qa/tasks/vstart_runner.py tasks.cephfs.test_client_recovery.TestClientRecovery.test_reconnect_timeout
The above command runs vstart_runner.py and passes the test to be executed as
an argument to vstart_runner.py. In a similar way, you can also run the group
of tests in the following manner::
$ # run all tests in class TestClientRecovery
- $ python2 ../qa/tasks/vstart_runner.py tasks.cephfs.test_client_recovery.TestClientRecovery
+ $ python ../qa/tasks/vstart_runner.py tasks.cephfs.test_client_recovery.TestClientRecovery
$ # run all tests in test_client_recovery.py
- $ python2 ../qa/tasks/vstart_runner.py tasks.cephfs.test_client_recovery
+ $ python ../qa/tasks/vstart_runner.py tasks.cephfs.test_client_recovery
Based on the argument passed, vstart_runner.py collects tests and executes as
it would execute a single test.
-.. note:: vstart_runner.py as well as most tests in ``qa/`` are only
- compatible with ``python2``. Therefore, use ``python2`` to run the
- tests locally.
-
vstart_runner.py can take the following options -
--clear-old-log deletes old log file before running the test