Robpol86 / FlashAirMusic

Convert FLAC music and sync it to a FlashAir WiFI SD card.
MIT License
0 stars 0 forks source link

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

Closed Robpol86 closed 8 years ago

Robpol86 commented 8 years ago

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 7526622fb64f16c62cd170975cbf7542a8d7b348):

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