Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
biboumi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
99
Issues
99
List
Boards
Labels
Service Desk
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
louiz’
biboumi
Commits
d57b8bb8
Commit
d57b8bb8
authored
Mar 17, 2016
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trivial formatting
parent
b32729fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
tests/end_to_end/__main__.py
tests/end_to_end/__main__.py
+10
-3
No files found.
tests/end_to_end/__main__.py
View file @
d57b8bb8
...
...
@@ -7,9 +7,10 @@ import signal
import
atexit
import
sys
from
functools
import
partial
from
slixmpp.xmlstream.matcher.base
import
MatcherBase
class
MatchAll
(
slixmpp
.
xmlstream
.
matcher
.
base
.
MatcherBase
):
class
MatchAll
(
MatcherBase
):
"""match everything"""
def
match
(
self
,
xml
):
...
...
@@ -80,11 +81,13 @@ class XMPPComponent(slixmpp.BaseXMPP):
self
.
accepting_server
=
yield
from
self
.
loop
.
create_server
(
lambda
:
self
,
"127.0.0.1"
,
"8811"
,
reuse_address
=
True
)
def
check_xpath
(
xpath
,
stanza
):
matched
=
slixmpp
.
xmlstream
.
matcher
.
xpath
.
MatchXPath
(
xpath
).
match
(
stanza
)
if
not
matched
:
raise
StanzaError
(
"Received stanza “%s” did not match expected xpath “%s”"
%
(
stanza
,
self
.
expected_xpath
))
class
Scenario
:
"""Defines a list of actions that are executed in sequence, until one of
them throws an exception, or until the end. An action can be something
...
...
@@ -107,7 +110,9 @@ class BiboumiRunner:
self
.
name
=
name
self
.
fd
=
open
(
"biboumi_%s_output.txt"
%
(
name
,),
"w"
)
if
with_valgrind
:
self
.
create
=
asyncio
.
create_subprocess_exec
(
"valgrind"
,
"--leak-check=full"
,
"--show-leak-kinds=all"
,
"--errors-for-leak-kinds=all"
,
"--error-exitcode=16"
,
"./biboumi"
,
"test.conf"
,
stdin
=
None
,
stdout
=
self
.
fd
,
self
.
create
=
asyncio
.
create_subprocess_exec
(
"valgrind"
,
"--leak-check=full"
,
"--show-leak-kinds=all"
,
"--errors-for-leak-kinds=all"
,
"--error-exitcode=16"
,
"./biboumi"
,
"test.conf"
,
stdin
=
None
,
stdout
=
self
.
fd
,
stderr
=
self
.
fd
,
loop
=
None
,
limit
=
None
)
else
:
self
.
create
=
asyncio
.
create_subprocess_exec
(
"./biboumi"
,
"test.conf"
,
stdin
=
None
,
stdout
=
self
.
fd
,
...
...
@@ -190,6 +195,7 @@ class BiboumiTest:
return
not
failed
confs
=
{
'basic'
:
"""hostname=biboumi.localhost
password=coucou
...
...
@@ -212,7 +218,8 @@ if __name__ == '__main__':
[
partial
(
expect_stanza
,
"{jabber:component:accept}handshake"
),
partial
(
send_stanza
,
"<handshake xmlns='jabber:component:accept'/>"
),
partial
(
send_stanza
,
"<presence from='me@example.com/Nick' to='#foo%irc.localhost@biboumi.localhost' />"
),
partial
(
send_stanza
,
"<presence from='me@example.com/Nick' to='#foo%irc.localhost@biboumi.localhost' />"
),
partial
(
expect_stanza
,
"{jabber:component:accept}message/body"
),
]),
)
...
...
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