I am currently using kitchen-docker
driver for my test kitchen
runs in order to speed up our automated cookbook tests.
However after playing for a while with this I found that every kitchen run fails if there is involved in any recipe a service
resource, if I try to stop/start/restart a service, this is not allowed within the container and the run fails.
If I get inside the container using kitchen login
, every time I try to use systemctl
... I get this error message:
[kitchen@17c054a76e8f ~]$ sudo systemctl restart foo
Failed to get D-Bus connection: Operation not permitted
Is there any way to fix this? I am currently running this image with option privileged: true
in .kitchen.yml
.