Running The Tests¶
Python 3.6 and virtualenv are required for running the unit tests. You can simply run
make test to execute them.
This will build a virtualenv with the required python packages, then run the tests
written in the
Python 3.6, virtualenv, and Docker are required to run the integration test suite.
You can run
make itest to execute them.
There is a docker compose configuration based on our itest containers that you can use to run the paasta code against a semi-realistic cluster whilst you are developing. More instructions here
System Package Building / itests¶
PaaSTA is distributed as a debian package. This package can be built and tested
make itest_xenial. These tests make assertions about the
Making new versions¶
Make a branch. WRITE TESTS FIRST (TDD)! Add features.
Submit your branch for review. Include the “paasta” group. Communicate with the team to select a single designated Primary Reviewer.
After ShipIts, merge your branch to master.
This version will become live automatically if the test suite passes.
If you do not want this, go to Puppet and pin the
paasta_toolspackage to the current (without your changes) version. The
mesosstagecluster will still pick up your changes (due to that cluster’s explicit hiera override of version to
latest) so you can test them there.
- If you do pin a specific version, email email@example.com to let the rest of the team know.
yelp_package/Makefileand bump the version in
make releaseand follow the instructions.
If you pinned a specific version earlier, remove the pin and let your version go out everywhere when you’re done.
Testing command-line tab completion¶
We use argcomplete to provide tab completion on the command-line. Testing it is a little tricky.
- There’s some guidance in argcomplete’s Debugging section.
- You can load the appropriate rules into your shell. Note that it is sensitive
to the exact path you use to invoke the command getting autocomplete hints:
eval "$(.tox/py27/bin/register-python-argcomplete ./tox/py27/bin/paasta)"
- There is a simple integration test. See the itest/ folder.