Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
surykatka
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
surykatka
Commits
2061b436
Commit
2061b436
authored
Dec 13, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test status against sqlite max variable limit
parent
ebd2504a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
tests/test_bot.py
tests/test_bot.py
+34
-0
No files found.
tests/test_bot.py
View file @
2061b436
...
@@ -561,6 +561,40 @@ class SurykatkaBotTestCase(unittest.TestCase):
...
@@ -561,6 +561,40 @@ class SurykatkaBotTestCase(unittest.TestCase):
"http_query"
:
[],
"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
():
def
suite
():
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment