ipaddr: unit tests for empty string (#58274)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2019-06-24 22:17:47 +05:30 committed by René Moser
parent 5569135efd
commit 2e1392eff8

View file

@ -276,6 +276,17 @@
- "'192.168.0.1/24' | ipaddr('network') == '192.168.0.0'"
- "'fe80::dead:beef/64' | ipaddr('broadcast') == 'fe80::ffff:ffff:ffff:ffff'"
- "'::1/120' | ipaddr('netmask') == 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ff00'"
- "{{ subnets | ipaddr(1) }} == ['10.1.1.1/24', '10.1.2.1/24']"
- "{{ subnets | ipaddr('1') }} == ['10.1.1.1/24', '10.1.2.1/24']"
- "{{ subnets | ipaddr(-1) }} == ['10.1.1.255/24', '10.1.2.255/24']"
- "{{ subnets | ipaddr('-1') }} == ['10.1.1.255/24', '10.1.2.255/24']"
- "'{{ prefix | ipaddr(1) }}' == '10.1.1.1/24'"
- "'{{ prefix | ipaddr('1') }}' == '10.1.1.1/24'"
- "'{{ prefix | ipaddr('network') }}' == '10.1.1.0'"
- "'{{ prefix | ipaddr('-1') }}' == '10.1.1.255/24'"
vars:
subnets: ['10.1.1.0/24', '10.1.2.0/24']
prefix: '10.1.1.0/24'
- name: Ensure dict2items works with hostvars
debug: