mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-07 06:34:23 -07:00
Backport of https://github.com/ansible-collections/community.docker/pull/88 to stable-1. (#1982)
This commit is contained in:
parent
1e1a843ff3
commit
a22113c3c2
3 changed files with 28 additions and 4 deletions
|
@ -1663,6 +1663,21 @@
|
|||
register: healthcheck_6
|
||||
ignore_errors: yes
|
||||
|
||||
- name: healthcheck (disabled, idempotency, strict)
|
||||
docker_container:
|
||||
image: "{{ docker_test_image_alpine }}"
|
||||
command: '/bin/sh -c "sleep 10m"'
|
||||
name: "{{ cname }}"
|
||||
state: started
|
||||
healthcheck:
|
||||
test:
|
||||
- NONE
|
||||
force_kill: yes
|
||||
comparisons:
|
||||
'*': strict
|
||||
register: healthcheck_7
|
||||
ignore_errors: yes
|
||||
|
||||
- name: healthcheck (string in healthcheck test, changed)
|
||||
docker_container:
|
||||
image: "{{ docker_test_image_alpine }}"
|
||||
|
@ -1672,7 +1687,7 @@
|
|||
healthcheck:
|
||||
test: "sleep 1"
|
||||
force_kill: yes
|
||||
register: healthcheck_7
|
||||
register: healthcheck_8
|
||||
ignore_errors: yes
|
||||
|
||||
- name: healthcheck (string in healthcheck test, idempotency)
|
||||
|
@ -1684,7 +1699,7 @@
|
|||
healthcheck:
|
||||
test: "sleep 1"
|
||||
force_kill: yes
|
||||
register: healthcheck_8
|
||||
register: healthcheck_9
|
||||
ignore_errors: yes
|
||||
|
||||
- name: cleanup
|
||||
|
@ -1702,8 +1717,9 @@
|
|||
- healthcheck_4 is not changed
|
||||
- healthcheck_5 is changed
|
||||
- healthcheck_6 is not changed
|
||||
- healthcheck_7 is changed
|
||||
- healthcheck_8 is not changed
|
||||
- healthcheck_7 is not changed
|
||||
- healthcheck_8 is changed
|
||||
- healthcheck_9 is not changed
|
||||
when: docker_py_version is version('2.0.0', '>=')
|
||||
- assert:
|
||||
that:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue