Commit 8f2acf39 authored by Xavier Thompson's avatar Xavier Thompson

software/theia: Skip IPv6 range test when unavailable

parent 3594adda
......@@ -34,6 +34,7 @@ import re
import subprocess
import sqlite3
import time
import unittest
import netaddr
import pexpect
......@@ -248,6 +249,12 @@ class TestTheia(TheiaTestCase):
proxy_path = self.getPath('srv', 'runner', 'var', 'proxy.db')
query = "SELECT partition_reference, address FROM partition_network%s" % DB_VERSION
ipv6, *prefixlen = self._ipv6_address.split('/')
if not prefixlen:
raise unittest.SkipTest('No IPv6 range')
elif int(prefixlen[0]) >= 123:
raise unittest.SkipTest('IPv6 range too small: %s' % self._ipv6_address)
with sqlite3.connect(proxy_path) as db:
rows = db.execute(query).fetchall()
partitions = set(p for p, _ in rows)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment