Commit 2061b436 authored by Romain Courteaud's avatar Romain Courteaud

Test status against sqlite max variable limit

parent ebd2504a
......@@ -561,6 +561,40 @@ class SurykatkaBotTestCase(unittest.TestCase):
"http_query": [],
}
def test_status_sqliteMaxVariableNumber(self):
# https://www.sqlite.org/limits.html
SQLITE_MAX_VARIABLE_NUMBER = 999
more_than_sqlite_max = SQLITE_MAX_VARIABLE_NUMBER * 10
bot = WebBot(
mapping={
"SQLITE": ":memory:",
"NAMESERVER": " ".join(
["%i.0.0.0" % x for x in range(more_than_sqlite_max)]
),
"DOMAIN": " ".join(
["%i.example.org" % x for x in range(more_than_sqlite_max)]
),
"URL": " ".join(
[
"https://%i.example.org/foo" % x
for x in range(more_than_sqlite_max)
]
),
}
)
bot.initDB()
result = bot.status()
assert result == {
"bot_status": [],
"dns_server": [],
"dns_query": [],
"http_server": [],
"ssl_certificate": [],
"http_query": [],
}
def suite():
suite = unittest.TestSuite()
......
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