We recently merged a new feature into the "develop" branch which allows
running the test harness in a Beaker container .
During the testing, I used the "restraint"  test harness instead of
default test harness, "beah". "restraint" is not available from
so the repository has to be added in the Job XML.
Here is an example recipe which runs the test harness in a container running Fedora 20:
The key points in the above recipe for this feature are:
- "contained_harness" ksmeta variable: This tells beaker that we want to run the
in a Docker container.
- The restraint repo is added using the <repo/> element.
- The task to be run is added in the <task/> elements.
Since this recipe does not specify which distro image to use for the test harness
we default to Fedora 20.
To specify a different image, use the "harness_docker_base_image" ksmeta
variable. For example, the following recipe will run the test harness in a CentOS 7
the host system is running Fedora 20:
As mentioned in , a privileged Docker container is used to run the test harness and by
we use "systemd" to initialize the test harness. Hence it is the harness's
register/install itself in the right target.
This can however be changed with the "contained_harness_entrypoint" ksmeta
See  for a brief explanation on this and the other ksmeta variables.
This is an experimental feature and currently the following limitations apply:
- Tests which reboot are not supported
- Tests which may want to spawn other containers are not supported as well
- Distros with SysV init hasn't been tested
- Beaker's default test harness, beah hasn't been tested
- .. others I am sure.
SED, Hosted & Shared Services
Red Hat, Inc.