From 2007d8413216d426bd661b9c5bff01a837932846 Mon Sep 17 00:00:00 2001 From: Sergey Date: Tue, 20 Oct 2020 16:54:33 +0300 Subject: [PATCH] Fix signals case for podman_container (#126) In #113 we made a change to lowercase only keys, but signals in image info are upper case. Fix tests - stop signal should be word, not number. Related to #125. --- plugins/modules/podman_container.py | 4 ++-- .../targets/podman_container_idempotency/files/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/modules/podman_container.py b/plugins/modules/podman_container.py index df5fcd3..b2df433 100644 --- a/plugins/modules/podman_container.py +++ b/plugins/modules/podman_container.py @@ -1715,10 +1715,10 @@ class PodmanContainerDiff: } before = str(self.info['config']['stopsignal']) if not before.isdigit(): - before = signals[before] + before = signals[before.lower()] after = str(self.params['stop_signal']) if not after.isdigit(): - after = signals[after] + after = signals[after.lower()] return self._diff_update_and_compare('stop_signal', before, after) def diffparam_tty(self): diff --git a/tests/integration/targets/podman_container_idempotency/files/Dockerfile b/tests/integration/targets/podman_container_idempotency/files/Dockerfile index 7f6721f..8d32e4a 100644 --- a/tests/integration/targets/podman_container_idempotency/files/Dockerfile +++ b/tests/integration/targets/podman_container_idempotency/files/Dockerfile @@ -21,7 +21,7 @@ EXPOSE 80 EXPOSE 8080/tcp VOLUME ["/data", "/data2"] USER user -STOPSIGNAL 9 +STOPSIGNAL SIGKILL # problem with OS w/o systemd # HEALTHCHECK --interval=5m --timeout=3s \