mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Updated localhost IPv6 tests to allow for different Linux OSs
This commit is contained in:
parent
eac9121a87
commit
fbd2fb282a
1 changed files with 9 additions and 2 deletions
|
@ -1378,12 +1378,19 @@ def test_ip_to_host(grains):
|
|||
assert ret is None
|
||||
|
||||
ret = network.ip_to_host("::1")
|
||||
log.warning(f"DGM test_ip_to_host ret '{ret}'")
|
||||
if grains["os"] == "Amazon":
|
||||
assert ret == "localhost6"
|
||||
elif grains["os_family"] == "Debian":
|
||||
assert ret == "ip6-localhost"
|
||||
if grains["osmajorrelease"] == "12":
|
||||
assert ret == "localhost"
|
||||
else:
|
||||
assert ret == "ip6-localhost"
|
||||
elif grains["os_family"] == "RedHat":
|
||||
if grains["oscodename"] == "Photon":
|
||||
assert ret == "ipv6-localhost"
|
||||
else:
|
||||
assert ret == "localhost"
|
||||
else:
|
||||
assert ret == "localhost"
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue