-
Notifications
You must be signed in to change notification settings - Fork 11
How we test Portus
All the tests have been written with RSpec, with some extra candy so it integrates flawlessly with the other tools that we are using. The test suite is located inside the spec
directory, and it can be run like this:
# Make sure to have have executed `bundle` before performing this.
$ bundle exec rspec spec
The acceptance tests are particularly slower. This is because for these tests we use the combination Capybara + Poltergeist, and it requires the database to be truncated before running each test.
After all tests have been run, we make a last check with SimpleCov. This gem checks that the code coverage status is at 100%. This is a way in which we make sure that our test suite is as thorough as possible.
to do
In order to test the appliance, we have a jenkins job that gets the image from the Open Build Service, imports it to an openStack cloud instance and launches an instance. In order to do so, we make use of the obs2openstack script.
Then the instance needs a manual interaction in order to configure it. One needs to go to the "console" and go through the yast2 firstboot workflow. When the yast2 firstboot workflow finishes, then the appliance will have network, not before.
Once the instance has network, we have a jenkins job that will run the scripts from appliance-test subdir.
In order to run the previous scripts, we make use of the run_in_obs script.
Continuous integration is run with Travis and the Opensuse Build Service. For details, see the .travis.yml file.