This tool provides shellmock functionality mainly for ( but not limited to ) test kitchen scenario.
Kitchen uses it as wrapper around
yum to setup mock dynamically as part of
yum install invocation during puppet run.
Defining common mock
shellmock.yaml add new entry in format of
package: /path/to/executable: contents
If you need no special functionality in mock then just leave contents empty
It will set up a mock in form of
I'm a fake /path/to/executable under
/path/to/executable path. Mock will return 0 exit status.
The mock will keep original binary at
Puppet type specific mocks
If you need to define a mock specific only to some type create yaml file with following name schema
For example to mock
varnishadm exclusively for
webfrontend type you can create
webfrontend.yaml file and put there
In some special cases the bootstrap puppet manifests rely on the things
included into the OS image, thus no
yum install happens for such packages.
This situation was workarounded by creating special type of core mocks and setting them duringyum clean all` which happens at the very beginning of
The core_mocks array controlled via core_mocks.yaml which consists of simple sequence of package list.
The core_mocks are not intended to modify frequently, but in some special cases it is required thing to perform.
Keep in mind that core mocks will be set up only during first converge as
yum clean is not getting invoked on subsequent converge run.
In other words if you need to introduce new core_mock - test it with
recreation of instance -
This project is in the maintenance mode.
The patches are going to be provided by engineers at GoodData Inc. in reactive manner.