Fix label sanitization error handling. (#1029)

This commit is contained in:
Felix Fontein
2025-01-22 21:45:08 +01:00
committed by GitHub
parent 9e26c4794e
commit 9cc70f5202
3 changed files with 13 additions and 1 deletions
@@ -118,6 +118,14 @@
## labels ##########################################################
####################################################################
- name: Create a volume with an invalid label
docker_volume:
name: "{{ vname }}"
labels:
foo: 1.0
register: driver_labels_invalid
ignore_errors: true
- name: Create a volume with labels
docker_volume:
name: "{{ vname }}"
@@ -173,6 +181,8 @@
- assert:
that:
- driver_labels_invalid is failed
- driver_labels_invalid.msg == "The value 1.0 for 'foo' of labels is not a string or something than can be safely converted to a string!"
- driver_labels_1 is changed
- driver_labels_2 is not changed
- driver_labels_3 is not changed