Commit 3bf68ae9 authored by Xavier Thompson's avatar Xavier Thompson Committed by Thomas Gambier

software/theia: Skip IPv6 range test when unavailable

parent c3c2da35
......@@ -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