mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-17 12:28:55 +00:00
Skip certain tests on Docker 27.0.0+. (#893)
This commit is contained in:
parent
eddeb91697
commit
08063a0439
@ -32,6 +32,10 @@
|
|||||||
- debug:
|
- debug:
|
||||||
msg: "Using container name prefix {{ cname_prefix }}"
|
msg: "Using container name prefix {{ cname_prefix }}"
|
||||||
|
|
||||||
|
- name: Retrieve docker host info
|
||||||
|
docker_host_info:
|
||||||
|
register: docker_host_info
|
||||||
|
|
||||||
# Run the tests
|
# Run the tests
|
||||||
- block:
|
- block:
|
||||||
- include_tasks: run-test.yml
|
- include_tasks: run-test.yml
|
||||||
|
|||||||
@ -3890,6 +3890,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
|
|||||||
- '[fe80::1%test]:90:90/tcp'
|
- '[fe80::1%test]:90:90/tcp'
|
||||||
force_kill: true
|
force_kill: true
|
||||||
register: published_ports_5
|
register: published_ports_5
|
||||||
|
when: docker_host_info.host_info.ServerVersion is version('27.0.0', '<')
|
||||||
|
|
||||||
- name: published_ports (ports with IP addresses, idempotent)
|
- name: published_ports (ports with IP addresses, idempotent)
|
||||||
docker_container:
|
docker_container:
|
||||||
@ -3902,6 +3903,7 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
|
|||||||
- '[::1]:9003:9003/tcp'
|
- '[::1]:9003:9003/tcp'
|
||||||
- '[fe80::1%test]:90:90/tcp'
|
- '[fe80::1%test]:90:90/tcp'
|
||||||
register: published_ports_6
|
register: published_ports_6
|
||||||
|
when: docker_host_info.host_info.ServerVersion is version('27.0.0', '<')
|
||||||
|
|
||||||
- name: published_ports (no published ports)
|
- name: published_ports (no published ports)
|
||||||
docker_container:
|
docker_container:
|
||||||
@ -3977,8 +3979,8 @@ avoid such warnings, please quote the value.' in (log_options_2.warnings | defau
|
|||||||
- published_ports_2 is not changed
|
- published_ports_2 is not changed
|
||||||
- published_ports_3 is not changed
|
- published_ports_3 is not changed
|
||||||
- published_ports_4 is changed
|
- published_ports_4 is changed
|
||||||
- published_ports_5 is changed
|
- (published_ports_5 is changed and published_ports_5 is not skipped) or published_ports_5 is skipped
|
||||||
- published_ports_6 is not changed
|
- (published_ports_6 is not changed and published_ports_6 is not skipped) or published_ports_6 is skipped
|
||||||
- published_ports_7 is changed
|
- published_ports_7 is changed
|
||||||
- published_ports_8 is changed
|
- published_ports_8 is changed
|
||||||
- published_ports_9 is changed
|
- published_ports_9 is changed
|
||||||
|
|||||||
@ -185,64 +185,66 @@
|
|||||||
## published_ports: IPv6 addresses #################################
|
## published_ports: IPv6 addresses #################################
|
||||||
####################################################################
|
####################################################################
|
||||||
|
|
||||||
- name: published_ports -- IPv6
|
- when: docker_host_info.host_info.ServerVersion is version('27.0.0', '<')
|
||||||
docker_container:
|
block:
|
||||||
image: "{{ docker_test_image_alpine }}"
|
- name: published_ports -- IPv6
|
||||||
command: '/bin/sh -c "sleep 10m"'
|
docker_container:
|
||||||
name: "{{ cname }}"
|
image: "{{ docker_test_image_alpine }}"
|
||||||
state: started
|
command: '/bin/sh -c "sleep 10m"'
|
||||||
published_ports:
|
name: "{{ cname }}"
|
||||||
- "[::1]:9001:9001"
|
state: started
|
||||||
force_kill: true
|
published_ports:
|
||||||
register: published_ports_1
|
- "[::1]:9001:9001"
|
||||||
|
force_kill: true
|
||||||
|
register: published_ports_1
|
||||||
|
|
||||||
- name: published_ports -- IPv6 (idempotency)
|
- name: published_ports -- IPv6 (idempotency)
|
||||||
docker_container:
|
docker_container:
|
||||||
image: "{{ docker_test_image_alpine }}"
|
image: "{{ docker_test_image_alpine }}"
|
||||||
command: '/bin/sh -c "sleep 10m"'
|
command: '/bin/sh -c "sleep 10m"'
|
||||||
name: "{{ cname }}"
|
name: "{{ cname }}"
|
||||||
state: started
|
state: started
|
||||||
published_ports:
|
published_ports:
|
||||||
- "[::1]:9001:9001"
|
- "[::1]:9001:9001"
|
||||||
force_kill: true
|
force_kill: true
|
||||||
register: published_ports_2
|
register: published_ports_2
|
||||||
|
|
||||||
- name: published_ports -- IPv6 (different IP)
|
- name: published_ports -- IPv6 (different IP)
|
||||||
docker_container:
|
docker_container:
|
||||||
image: "{{ docker_test_image_alpine }}"
|
image: "{{ docker_test_image_alpine }}"
|
||||||
command: '/bin/sh -c "sleep 10m"'
|
command: '/bin/sh -c "sleep 10m"'
|
||||||
name: "{{ cname }}"
|
name: "{{ cname }}"
|
||||||
state: started
|
state: started
|
||||||
published_ports:
|
published_ports:
|
||||||
- "127.0.0.1:9001:9001"
|
- "127.0.0.1:9001:9001"
|
||||||
force_kill: true
|
force_kill: true
|
||||||
register: published_ports_3
|
register: published_ports_3
|
||||||
|
|
||||||
- name: published_ports -- IPv6 (hostname)
|
- name: published_ports -- IPv6 (hostname)
|
||||||
docker_container:
|
docker_container:
|
||||||
image: "{{ docker_test_image_alpine }}"
|
image: "{{ docker_test_image_alpine }}"
|
||||||
command: '/bin/sh -c "sleep 10m"'
|
command: '/bin/sh -c "sleep 10m"'
|
||||||
name: "{{ cname }}"
|
name: "{{ cname }}"
|
||||||
state: started
|
state: started
|
||||||
published_ports:
|
published_ports:
|
||||||
- "localhost:9001:9001"
|
- "localhost:9001:9001"
|
||||||
force_kill: true
|
force_kill: true
|
||||||
register: published_ports_4
|
register: published_ports_4
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: cleanup
|
- name: cleanup
|
||||||
docker_container:
|
docker_container:
|
||||||
name: "{{ cname }}"
|
name: "{{ cname }}"
|
||||||
state: absent
|
state: absent
|
||||||
force_kill: true
|
force_kill: true
|
||||||
diff: false
|
diff: false
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that:
|
that:
|
||||||
- published_ports_1 is changed
|
- published_ports_1 is changed
|
||||||
- published_ports_2 is not changed
|
- published_ports_2 is not changed
|
||||||
- published_ports_3 is changed
|
- published_ports_3 is changed
|
||||||
- published_ports_4 is failed
|
- published_ports_4 is failed
|
||||||
|
|
||||||
####################################################################
|
####################################################################
|
||||||
## publish_all_ports ###############################################
|
## publish_all_ports ###############################################
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user