iotests: 147: Don't test inet6 if not available
This is the case in our docker tests, as we use --net=none there. Skip this method. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
0bb0aea4ba
commit
cf1cd117e2
|
@ -147,6 +147,13 @@ class BuiltinNBD(NBDBlockdevAddBase):
|
||||||
self._server_down()
|
self._server_down()
|
||||||
|
|
||||||
def test_inet6(self):
|
def test_inet6(self):
|
||||||
|
try:
|
||||||
|
socket.getaddrinfo("::0", "0", socket.AF_INET6,
|
||||||
|
socket.SOCK_STREAM, socket.IPPROTO_TCP,
|
||||||
|
socket.AI_ADDRCONFIG | socket.AI_CANONNAME)
|
||||||
|
except socket.gaierror:
|
||||||
|
# IPv6 not available, skip
|
||||||
|
return
|
||||||
address = { 'type': 'inet',
|
address = { 'type': 'inet',
|
||||||
'data': {
|
'data': {
|
||||||
'host': '::1',
|
'host': '::1',
|
||||||
|
|
Loading…
Reference in New Issue