1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00

Fix uppercase labels idempotency issue (#230)

When we lower cases for all keys, but leave it original case for
all values, we need to do the same with input labels.
Add test.
Fix #227
This commit is contained in:
Sergey 2021-04-01 16:33:27 +03:00 committed by GitHub
parent f41c63815f
commit 607c120f94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -873,7 +873,7 @@ class PodmanContainerDiff:
after = self.image_info.get('labels') or {}
if self.params['label']:
after.update({
str(k).lower(): str(v).lower()
str(k).lower(): str(v)
for k, v in self.params['label'].items()
})
return self._diff_update_and_compare('label', before, after)

View file

@ -51,7 +51,9 @@
state: present
label:
haha: kukuku
llala: wiwiwiw
LLALA: WIWIWIW
OEIWIOP: eufslsa
ieui4: KDJSL4D
command: 1h
register: test4
@ -65,7 +67,9 @@
state: present
label:
haha: kukuku
llala: wiwiwiw
LLALA: WIWIWIW
OEIWIOP: eufslsa
ieui4: KDJSL4D
command: 1h
register: test5