Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Enable service start/stop/grep tests in Docker once they fix systemd issue. #1

Closed
Robpol86 opened this issue Jan 3, 2016 · 0 comments

Comments

@Robpol86
Copy link
Owner

Robpol86 commented Jan 3, 2016

Currently it seems Docker containers cannot run systemctl, probably an SELinux issue on the Docker host. I get this:

[root@fb68c7859cc6 build]# systemctl status FlashAirMusic                         
Failed to get D-Bus connection: Operation not permitted

Once they fix it in a future release merge this into Makefile in (taken at 7526622):

diff --git a/Makefile b/Makefile
index 8706b83..5a1d92e 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,14 @@ docker-rpmtest:
        test "$$(rpm -q $(NAME) --queryformat '%{URL}')" == "$(URL)"
        test $$(rpm -q $(NAME) --queryformat '%{VERSION}') == "$(VERSION)"
        test $$($(NAME) --version) == "$(VERSION)"
+       ! test -f /var/log/$(NAME)/$(NAME).log
+       systemctl start $(NAME).service
+       sleep 2
+       systemctl status $(NAME).service
+       systemctl stop $(NAME).service
+       sleep 2
+       ! systemctl status $(NAME).service
+       grep "Shutting down" /var/log/$(NAME)/$(NAME).log


 .PHONY: docker-build-images
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant