Add integration test using Cockpit test API

Closes #16
This commit is contained in:
Martin Pitt 2018-03-08 15:29:31 +01:00 committed by Lars Karlitski
parent c99c9e2d38
commit 931e1be3c3
7 changed files with 102 additions and 1 deletions

View file

@ -14,6 +14,26 @@ to generate the distribution tarball. In `production` mode, source files are
automatically minified and compressed. Set `NODE_ENV=production` if you want to
duplicate this behavior.
# Testing
Run `make check` to build an RPM, install it into a standard Cockpit test VM
(centos-7 by default), and run the test/check-starter-kit integration test on
it. This uses Cockpit's Chrome DevTools Protocol based browser tests, through a
Python API abstraction. Note that this API is not guaranteed to be stable, so
if you run into failures and don't want to adjust tests, consider checking out
Cockpit's test/common from a tag instead of master (see the `test/common`
target in `Makefile`).
After the test VM is prepared, you can manually run the test without rebuilding
the VM, possibly with extra options for tracing and halting on test failures
(for interactive debugging):
TEST_OS=centos-7 test/check-starter-kit -tvs
You can also run the test against a different Cockpit image, for example:
TEST_OS=fedora-27 make check
# Vagrant
This directory contains a Vagrantfile that installs and starts cockpit on a