tests: Make IPv4 assumption explicit
authorTim Beale <timbeale@catalyst.net.nz>
Tue, 12 Mar 2019 21:18:41 +0000 (10:18 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 14 Mar 2019 02:12:19 +0000 (02:12 +0000)
commit1fb01c5b11fe4acfe1178f42cccb24136ae938e5
tree158b1caed5ce2f401c6536e7de7b48b104b4eb02
parente9c01fdbb8eb1a185f4c45a5928e9d13d46e3aed
tests: Make IPv4 assumption explicit

This test is asserting the expected number of *IPv4* addresses, not any
interface address (including IPv6). It works currently because the
selftest client doesn't have an IPv6 address in its smb.conf.

This patch makes the IPv4 assumption explicit by importing
interface_ips_v4() from the provision code. We need to tweak this to
pass through an 'all_interfaces' flag, otherwise it filters out the
loopback IP addresses that the testenv is using.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/provision/__init__.py
python/samba/tests/join.py