-
Notifications
You must be signed in to change notification settings - Fork 78
Dev guide
For compiling and running unit tests:
- Go >= 1.7
- make
For running smoke test:
- Docker
For running system tests:
- Vagrant
- VirtualBox
Branch master contains work for the next release. All changes must be done on feature branches, and there preferably should be a 1-1 correspondence between feature branches and issues.
When ready to merge, push the feature branch to Github and then make a pull request (for merging to master). This will cause Travis CI to run the smoke test, and it will not be possible to merge the PR until this test passes.
Unit tests are run during the smoke test and during any platform test. To run them locally, from the root of the repo do make check
.
The unit tests are traditional Go unit tests, with the addition of the library testify.
The smoke test is run automatically by Travis CI when a PR is made. It does the following:
- Launch a CentOS Docker container
- Copy the Jobber source into the container
- Build the Jobber RPM for CentOS 6
- Install the RPM
- Run the platform test
If you want to run it locally, make sure Docker is running, then do make -C smoke_tests
.
The system tests test Jobber on specific operating systems. Each one does two main things:
- Test the creation and installation of the OS-specific package
- Test the behavior of Jobber on that OS
They rely on virtual machines, which are automatically managed by make scripts using Vagrant.
The package-creation scripts are in respective directories in packaging.
Testing Jobber's behavior is done by the platform test, which uses Robot Framework.
To run a system test locally, make sure VirtualBox and Vagrant are installed, and then do make -C packaging/<os> test-vm
--- e.g., make -C packaging/centos_6 test-vm
.