I am writing a test case that tests installation and removal of Debian packages. The debian package had a systemd process in it. During the start up the systemd takes care of starting the service and all the logs are forwarded to systemd.
Since the test cases are aimed to run in the integration/end-end test pipe line and also the test is aimed to run inside a container. From inside container we should be able to do apt install <my_service.deb>
. But the issue being containers do not have systemd in them.
A quick internet search resulted and alternative to systemd inside docker like supervisor and other being volume mounting and starting container in privilage mode –privileged -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro
.
How do people usually test debian installation and uninstallation of the debian package. Are there any alternative of having systemd inside a container ?