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
88
Issues
88
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
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
efb695be
Commit
efb695be
authored
Nov 09, 2019
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
e2e: Implicitely include the handshake in all tests
Instead of having to write it manually everytime
parent
17366413
Changes
55
Hide whitespace changes
Inline
Side-by-side
Showing
55 changed files
with
10 additions
and
71 deletions
+10
-71
tests/end_to_end/__main__.py
tests/end_to_end/__main__.py
+4
-1
tests/end_to_end/scenarios/basic_handshake_success.py
tests/end_to_end/scenarios/basic_handshake_success.py
+4
-1
tests/end_to_end/scenarios/basic_subscribe_unsubscribe.py
tests/end_to_end/scenarios/basic_subscribe_unsubscribe.py
+1
-1
tests/end_to_end/scenarios/channel_join_on_fixed_irc_server.py
.../end_to_end/scenarios/channel_join_on_fixed_irc_server.py
+1
-1
tests/end_to_end/scenarios/channel_join_with_different_nick.py
.../end_to_end/scenarios/channel_join_with_different_nick.py
+0
-1
tests/end_to_end/scenarios/channel_list_escaping.py
tests/end_to_end/scenarios/channel_list_escaping.py
+0
-2
tests/end_to_end/scenarios/complete_channel_list_with_pages_of_3.py
...to_end/scenarios/complete_channel_list_with_pages_of_3.py
+0
-2
tests/end_to_end/scenarios/configure_bad_value.py
tests/end_to_end/scenarios/configure_bad_value.py
+0
-2
tests/end_to_end/scenarios/default_channel_list_limit.py
tests/end_to_end/scenarios/default_channel_list_limit.py
+0
-2
tests/end_to_end/scenarios/default_mam_limit.py
tests/end_to_end/scenarios/default_mam_limit.py
+0
-2
tests/end_to_end/scenarios/encoded_channel_join.py
tests/end_to_end/scenarios/encoded_channel_join.py
+0
-1
tests/end_to_end/scenarios/execute_admin_disconnect_from_server_adhoc_command.py
...ios/execute_admin_disconnect_from_server_adhoc_command.py
+0
-2
tests/end_to_end/scenarios/execute_disconnect_user_adhoc_command.py
...to_end/scenarios/execute_disconnect_user_adhoc_command.py
+0
-1
tests/end_to_end/scenarios/execute_forbidden_adhoc_command.py
...s/end_to_end/scenarios/execute_forbidden_adhoc_command.py
+0
-1
tests/end_to_end/scenarios/execute_hello_adhoc_command.py
tests/end_to_end/scenarios/execute_hello_adhoc_command.py
+0
-1
tests/end_to_end/scenarios/execute_incomplete_hello_adhoc_command.py
...o_end/scenarios/execute_incomplete_hello_adhoc_command.py
+0
-1
tests/end_to_end/scenarios/execute_ping_adhoc_command.py
tests/end_to_end/scenarios/execute_ping_adhoc_command.py
+0
-1
tests/end_to_end/scenarios/execute_reload_adhoc_command.py
tests/end_to_end/scenarios/execute_reload_adhoc_command.py
+0
-1
tests/end_to_end/scenarios/fixed_irc_server_subscription.py
tests/end_to_end/scenarios/fixed_irc_server_subscription.py
+0
-1
tests/end_to_end/scenarios/fixed_muc_disco_info.py
tests/end_to_end/scenarios/fixed_muc_disco_info.py
+0
-2
tests/end_to_end/scenarios/get_irc_connection_info.py
tests/end_to_end/scenarios/get_irc_connection_info.py
+0
-2
tests/end_to_end/scenarios/get_irc_connection_info_fixed.py
tests/end_to_end/scenarios/get_irc_connection_info_fixed.py
+0
-2
tests/end_to_end/scenarios/global_configure.py
tests/end_to_end/scenarios/global_configure.py
+0
-1
tests/end_to_end/scenarios/global_configure_fixed.py
tests/end_to_end/scenarios/global_configure_fixed.py
+0
-1
tests/end_to_end/scenarios/global_configure_persistent_by_default.py
...o_end/scenarios/global_configure_persistent_by_default.py
+0
-1
tests/end_to_end/scenarios/invite_other.py
tests/end_to_end/scenarios/invite_other.py
+0
-1
tests/end_to_end/scenarios/irc_channel_configure.py
tests/end_to_end/scenarios/irc_channel_configure.py
+0
-1
tests/end_to_end/scenarios/irc_channel_configure_fixed.py
tests/end_to_end/scenarios/irc_channel_configure_fixed.py
+0
-1
tests/end_to_end/scenarios/irc_channel_configure_xep0045.py
tests/end_to_end/scenarios/irc_channel_configure_xep0045.py
+0
-1
tests/end_to_end/scenarios/irc_server_configure.py
tests/end_to_end/scenarios/irc_server_configure.py
+0
-1
tests/end_to_end/scenarios/irc_server_connection.py
tests/end_to_end/scenarios/irc_server_connection.py
+0
-1
tests/end_to_end/scenarios/irc_server_connection_failure.py
tests/end_to_end/scenarios/irc_server_connection_failure.py
+0
-1
tests/end_to_end/scenarios/irc_server_presence_in_roster.py
tests/end_to_end/scenarios/irc_server_presence_in_roster.py
+0
-2
tests/end_to_end/scenarios/irc_server_presence_subscription.py
.../end_to_end/scenarios/irc_server_presence_subscription.py
+0
-1
tests/end_to_end/scenarios/irc_tls_connection.py
tests/end_to_end/scenarios/irc_tls_connection.py
+0
-1
tests/end_to_end/scenarios/join_history_limit.py
tests/end_to_end/scenarios/join_history_limit.py
+0
-2
tests/end_to_end/scenarios/leave_unjoined_chan.py
tests/end_to_end/scenarios/leave_unjoined_chan.py
+0
-1
tests/end_to_end/scenarios/list_adhoc.py
tests/end_to_end/scenarios/list_adhoc.py
+0
-1
tests/end_to_end/scenarios/list_adhoc_fixed_server.py
tests/end_to_end/scenarios/list_adhoc_fixed_server.py
+0
-1
tests/end_to_end/scenarios/list_adhoc_irc.py
tests/end_to_end/scenarios/list_adhoc_irc.py
+0
-1
tests/end_to_end/scenarios/list_admin_adhoc.py
tests/end_to_end/scenarios/list_admin_adhoc.py
+0
-1
tests/end_to_end/scenarios/list_admin_adhoc_fixed_server.py
tests/end_to_end/scenarios/list_admin_adhoc_fixed_server.py
+0
-1
tests/end_to_end/scenarios/list_muc_user_adhoc.py
tests/end_to_end/scenarios/list_muc_user_adhoc.py
+0
-1
tests/end_to_end/scenarios/muc_disco_info.py
tests/end_to_end/scenarios/muc_disco_info.py
+0
-2
tests/end_to_end/scenarios/muc_traffic_info.py
tests/end_to_end/scenarios/muc_traffic_info.py
+0
-2
tests/end_to_end/scenarios/multiple_channels_join.py
tests/end_to_end/scenarios/multiple_channels_join.py
+0
-2
tests/end_to_end/scenarios/multisessionnick.py
tests/end_to_end/scenarios/multisessionnick.py
+0
-2
tests/end_to_end/scenarios/nick_change_in_join.py
tests/end_to_end/scenarios/nick_change_in_join.py
+0
-1
tests/end_to_end/scenarios/not_connected_error.py
tests/end_to_end/scenarios/not_connected_error.py
+0
-1
tests/end_to_end/scenarios/raw_message.py
tests/end_to_end/scenarios/raw_message.py
+0
-1
tests/end_to_end/scenarios/raw_message_fixed_irc_server.py
tests/end_to_end/scenarios/raw_message_fixed_irc_server.py
+0
-2
tests/end_to_end/scenarios/resource_is_removed_from_server_when_last_chan_is_left.py
...resource_is_removed_from_server_when_last_chan_is_left.py
+0
-1
tests/end_to_end/scenarios/self_disco_info.py
tests/end_to_end/scenarios/self_disco_info.py
+0
-1
tests/end_to_end/scenarios/simple_channel_join.py
tests/end_to_end/scenarios/simple_channel_join.py
+0
-1
tests/end_to_end/scenarios/simple_channel_join_fixed.py
tests/end_to_end/scenarios/simple_channel_join_fixed.py
+0
-1
No files found.
tests/end_to_end/__main__.py
View file @
efb695be
...
...
@@ -292,7 +292,10 @@ def get_scenarios(test_path, provided_scenar_names):
conf
=
"basic"
if
hasattr
(
mod
,
"conf"
):
conf
=
mod
.
conf
scenarios
.
append
(
Scenario
(
module_name
,
mod
.
scenario
,
conf
))
# Every scenario needs to start with the handshake sequence.
# Instead of repeating it everytime, we add it implicitely. This
# is done here.
scenarios
.
append
(
Scenario
(
module_name
,
(
sequences
.
handshake
(),)
+
mod
.
scenario
,
conf
))
return
scenarios
...
...
tests/end_to_end/scenarios/basic_handshake_success.py
View file @
efb695be
from
scenarios
import
*
# At the start of every scenario, we automatically insert a
# sequences.handshake() call. So, this scenario is just here to test that
# this basic thing works fine.
scenario
=
(
sequences
.
handshake
(),
)
tests/end_to_end/scenarios/basic_subscribe_unsubscribe.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
# Mutual subscription exchange
send_stanza
(
"<presence from='{jid_one}' to='{biboumi_host}' type='subscribe' id='subid1' />"
),
...
...
tests/end_to_end/scenarios/channel_join_on_fixed_irc_server.py
View file @
efb695be
...
...
@@ -3,7 +3,7 @@ from scenarios import *
conf
=
"fixed_server"
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#foo@{biboumi_host}/{nick_one}' />"
),
sequences
.
connection
(
"irc.localhost"
,
'{jid_one}/{resource_one}'
,
fixed_irc_server
=
True
),
expect_stanza
(
"/message/body[text()='Mode #foo [+nt] by {irc_host_one}']"
),
...
...
tests/end_to_end/scenarios/channel_join_with_different_nick.py
View file @
efb695be
...
...
@@ -3,7 +3,6 @@ from scenarios import *
from
scenarios.simple_channel_join
import
expect_self_join_presence
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(
"irc.localhost"
,
'{jid_one}/{resource_one}'
),
expect_self_join_presence
(
jid
=
'{jid_one}/{resource_one}'
,
chan
=
"#foo"
,
nick
=
"{nick_one}"
),
...
...
tests/end_to_end/scenarios/channel_list_escaping.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#true
\\
2ffalse%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(
"irc.localhost"
,
'{jid_one}/{resource_one}'
),
expect_stanza
(
"/message/body[text()='Mode #true/false [+nt] by {irc_host_one}']"
),
...
...
tests/end_to_end/scenarios/complete_channel_list_with_pages_of_3.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#aaa%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(
"irc.localhost"
,
'{jid_one}/{resource_one}'
),
expect_stanza
(
"/message"
),
...
...
tests/end_to_end/scenarios/configure_bad_value.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
# Configure the throttle option with an incorrect value
send_stanza
(
"<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='{irc_server_one}'><command xmlns='http://jabber.org/protocol/commands' node='configure' action='execute' /></iq>"
),
expect_stanza
(
"/iq[@type='result']"
,
...
...
tests/end_to_end/scenarios/default_channel_list_limit.py
View file @
efb695be
...
...
@@ -11,8 +11,6 @@ def incr_counter():
counter
=
incr_counter
()
scenario
=
(
sequences
.
handshake
(),
# Disable the throttling, otherwise it’s way too long
send_stanza
(
"<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='{irc_server_one}'><command xmlns='http://jabber.org/protocol/commands' node='configure' action='execute' /></iq>"
),
expect_stanza
(
"/iq[@type='result']"
,
...
...
tests/end_to_end/scenarios/default_mam_limit.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
# Disable the throttling, otherwise it’s way too long
send_stanza
(
"<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='{irc_server_one}'><command xmlns='http://jabber.org/protocol/commands' node='configure' action='execute' /></iq>"
),
expect_stanza
(
"/iq[@type='result']"
,
...
...
tests/end_to_end/scenarios/encoded_channel_join.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#biboumi
\\
40louiz.org
\\
3a80%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(
"irc.localhost"
,
'{jid_one}/{resource_one}'
),
expect_stanza
(
"/message/body[text()='Mode #biboumi@louiz.org:80 [+nt] by {irc_host_one}']"
),
...
...
tests/end_to_end/scenarios/execute_admin_disconnect_from_server_adhoc_command.py
View file @
efb695be
...
...
@@ -3,8 +3,6 @@ from scenarios import *
from
scenarios.simple_channel_join
import
expect_self_join_presence
scenario
=
(
sequences
.
handshake
(),
# Admin connects to first server
send_stanza
(
"<presence from='{jid_admin}/{resource_one}' to='#bar%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(
"irc.localhost"
,
'{jid_admin}/{resource_one}'
),
...
...
tests/end_to_end/scenarios/execute_disconnect_user_adhoc_command.py
View file @
efb695be
...
...
@@ -3,7 +3,6 @@ from scenarios import *
from
scenarios.simple_channel_join
import
expect_self_join_presence
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_admin}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(
"irc.localhost"
,
'{jid_admin}/{resource_one}'
),
expect_self_join_presence
(
jid
=
'{jid_admin}/{resource_one}'
,
chan
=
"#foo"
,
nick
=
"{nick_one}"
),
...
...
tests/end_to_end/scenarios/execute_forbidden_adhoc_command.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='set' id='command1' from='{jid_one}/{resource_one}' to='{biboumi_host}'><command xmlns='http://jabber.org/protocol/commands' node='disconnect-user' action='execute' /></iq>"
),
expect_stanza
(
"/iq[@type='error'][@id='command1']/commands:command[@node='disconnect-user']"
,
"/iq/commands:command/commands:error[@type='cancel']/stanza:forbidden"
),
...
...
tests/end_to_end/scenarios/execute_hello_adhoc_command.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='set' id='hello-command1' from='{jid_one}/{resource_one}' to='{biboumi_host}'><command xmlns='http://jabber.org/protocol/commands' node='hello' action='execute' /></iq>"
),
expect_stanza
(
"/iq[@type='result']/commands:command[@node='hello'][@sessionid][@status='executing']"
,
"/iq/commands:command/dataform:x[@type='form']/dataform:title[text()='Configure your name.']"
,
...
...
tests/end_to_end/scenarios/execute_incomplete_hello_adhoc_command.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='set' id='hello-command1' from='{jid_one}/{resource_one}' to='{biboumi_host}'><command xmlns='http://jabber.org/protocol/commands' node='hello' action='execute' /></iq>"
),
expect_stanza
(
"/iq[@type='result']/commands:command[@node='hello'][@sessionid][@status='executing']"
,
"/iq/commands:command/commands:actions/commands:complete"
,
...
...
tests/end_to_end/scenarios/execute_ping_adhoc_command.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='set' id='ping-command1' from='{jid_one}/{resource_one}' to='{biboumi_host}'><command xmlns='http://jabber.org/protocol/commands' node='ping' action='execute' /></iq>"
),
expect_stanza
(
"/iq[@type='result']/commands:command[@node='ping'][@status='completed']/commands:note[@type='info'][text()='Pong']"
)
)
tests/end_to_end/scenarios/execute_reload_adhoc_command.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='set' id='ping-command1' from='{jid_admin}/{resource_one}' to='{biboumi_host}'><command xmlns='http://jabber.org/protocol/commands' node='reload' action='execute' /></iq>"
),
expect_stanza
(
"/iq[@type='result']/commands:command[@node='reload'][@status='completed']/commands:note[@type='info'][text()='Configuration reloaded.']"
),
)
tests/end_to_end/scenarios/fixed_irc_server_subscription.py
View file @
efb695be
...
...
@@ -3,7 +3,6 @@ from scenarios import *
conf
=
'fixed_server'
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence type='subscribe' from='{jid_one}/{resource_one}' to='{biboumi_host}' id='sub1' />"
),
expect_stanza
(
"/presence[@to='{jid_one}'][@from='{biboumi_host}'][@type='subscribed']"
)
)
tests/end_to_end/scenarios/fixed_muc_disco_info.py
View file @
efb695be
...
...
@@ -3,8 +3,6 @@ from scenarios import *
conf
=
'fixed_server'
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq from='{jid_one}/{resource_one}' to='#foo@{biboumi_host}' id='1' type='get'><query xmlns='http://jabber.org/protocol/disco#info'/></iq>"
),
expect_stanza
(
"/iq[@from='#foo@{biboumi_host}'][@to='{jid_one}/{resource_one}'][@type='result']/disco_info:query"
,
"/iq[@type='result']/disco_info:query/disco_info:identity[@category='conference'][@type='irc'][@name='#foo on {irc_host_one}']"
,
...
...
tests/end_to_end/scenarios/get_irc_connection_info.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='set' id='command1' from='{jid_one}/{resource_one}' to='{irc_server_one}'><command xmlns='http://jabber.org/protocol/commands' node='get-irc-connection-info' action='execute' /></iq>"
),
expect_stanza
(
"/iq/commands:command/commands:note[text()='You are not connected to the IRC server irc.localhost']"
),
...
...
tests/end_to_end/scenarios/get_irc_connection_info_fixed.py
View file @
efb695be
...
...
@@ -3,8 +3,6 @@ from scenarios import *
conf
=
'fixed_server'
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='set' id='command1' from='{jid_one}/{resource_one}' to='{biboumi_host}'><command xmlns='http://jabber.org/protocol/commands' node='get-irc-connection-info' action='execute' /></iq>"
),
expect_stanza
(
"/iq/commands:command/commands:note[text()='You are not connected to the IRC server irc.localhost']"
),
...
...
tests/end_to_end/scenarios/global_configure.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='{biboumi_host}'><command xmlns='http://jabber.org/protocol/commands' node='configure' action='execute' /></iq>"
),
expect_stanza
(
"/iq[@type='result']/commands:command[@node='configure'][@sessionid][@status='executing']"
,
"/iq/commands:command/dataform:x[@type='form']/dataform:title[text()='Configure some global default settings.']"
,
...
...
tests/end_to_end/scenarios/global_configure_fixed.py
View file @
efb695be
...
...
@@ -3,7 +3,6 @@ from scenarios import *
conf
=
'fixed_server'
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='{biboumi_host}'><command xmlns='http://jabber.org/protocol/commands' node='global-configure' action='execute' /></iq>"
),
expect_stanza
(
"/iq[@type='result']/commands:command[@node='global-configure'][@sessionid][@status='executing']"
,
"/iq/commands:command/dataform:x[@type='form']/dataform:title[text()='Configure some global default settings.']"
,
...
...
tests/end_to_end/scenarios/global_configure_persistent_by_default.py
View file @
efb695be
...
...
@@ -3,7 +3,6 @@ from scenarios import *
conf
=
'persistent_by_default'
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='{biboumi_host}'><command xmlns='http://jabber.org/protocol/commands' node='configure' action='execute' /></iq>"
),
expect_stanza
(
"/iq[@type='result']/commands:command[@node='configure'][@sessionid][@status='executing']"
,
"/iq/commands:command/dataform:x[@type='form']/dataform:title[text()='Configure some global default settings.']"
,
...
...
tests/end_to_end/scenarios/invite_other.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(
"irc.localhost"
,
'{jid_one}/{resource_one}'
),
expect_stanza
(
"/message"
),
...
...
tests/end_to_end/scenarios/irc_channel_configure.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}'><command xmlns='http://jabber.org/protocol/commands' node='configure' action='execute'><dummy/></command></iq>"
),
expect_stanza
(
"/iq[@type='result']/commands:command[@node='configure'][@sessionid][@status='executing']"
,
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='encoding_in']"
,
...
...
tests/end_to_end/scenarios/irc_channel_configure_fixed.py
View file @
efb695be
...
...
@@ -3,7 +3,6 @@ from scenarios import *
conf
=
'fixed_server'
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='#foo@{biboumi_host}'><command xmlns='http://jabber.org/protocol/commands' node='configure' action='execute' /></iq>"
),
expect_stanza
(
"/iq[@type='result']/commands:command[@node='configure'][@sessionid][@status='executing']"
,
"/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='encoding_in']"
,
...
...
tests/end_to_end/scenarios/irc_channel_configure_xep0045.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='get' id='id1' from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}'><query xmlns='http://jabber.org/protocol/muc#owner'/></iq>"
),
expect_stanza
(
"/iq[@type='result']/muc_owner:query"
,
"/iq/muc_owner:query/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='encoding_in']"
,
...
...
tests/end_to_end/scenarios/irc_server_configure.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='{irc_server_one}'><command xmlns='http://jabber.org/protocol/commands' node='configure' action='execute' /></iq>"
),
expect_stanza
(
"/iq[@type='result']/commands:command[@node='configure'][@sessionid][@status='executing']"
,
"/iq/commands:command/dataform:x[@type='form']/dataform:title[text()='Configure the IRC server irc.localhost']"
,
...
...
tests/end_to_end/scenarios/irc_server_connection.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(),
)
...
...
tests/end_to_end/scenarios/irc_server_connection_failure.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#foo%doesnotexist@{biboumi_host}/{nick_one}' />"
),
expect_stanza
(
"/message/body[text()='Connecting to doesnotexist:6697 (encrypted)']"
),
expect_stanza
(
"/message/body[re:test(text(), 'Connection failed: (Domain name not found|Name or service not known)')]"
),
...
...
tests/end_to_end/scenarios/irc_server_presence_in_roster.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
# Mutual subscription exchange
send_stanza
(
"<presence from='{jid_one}' to='{irc_server_one}' type='subscribe' id='subid1' />"
),
expect_stanza
(
"/presence[@type='subscribed'][@id='subid1']"
),
...
...
tests/end_to_end/scenarios/irc_server_presence_subscription.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence type='subscribe' from='{jid_one}/{resource_one}' to='{irc_server_one}' id='sub1' />"
),
expect_stanza
(
"/presence[@to='{jid_one}'][@from='{irc_server_one}'][@type='subscribed']"
),
)
tests/end_to_end/scenarios/irc_tls_connection.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
# First, use an adhoc command to configure how we connect to the irc server, configure
# only one TLS port, and disable the cert verification.
send_stanza
(
"<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='{irc_server_one}'><command xmlns='http://jabber.org/protocol/commands' node='configure' action='execute' /></iq>"
),
...
...
tests/end_to_end/scenarios/join_history_limit.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
# Disable the throttling because the test is based on timings
send_stanza
(
"<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='{irc_server_one}'><command xmlns='http://jabber.org/protocol/commands' node='configure' action='execute' /></iq>"
),
expect_stanza
(
"/iq[@type='result']"
,
...
...
tests/end_to_end/scenarios/leave_unjoined_chan.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(
"irc.localhost"
,
'{jid_one}/{resource_one}'
),
expect_stanza
(
"/message"
),
...
...
tests/end_to_end/scenarios/list_adhoc.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='get' id='idwhatever' from='{jid_one}/{resource_one}' to='{biboumi_host}'><query xmlns='http://jabber.org/protocol/disco#items' node='http://jabber.org/protocol/commands' /></iq>"
),
expect_stanza
(
"/iq[@type='result']/disco_items:query[@node='http://jabber.org/protocol/commands']"
,
"/iq/disco_items:query/disco_items:item[@node='configure']"
,
...
...
tests/end_to_end/scenarios/list_adhoc_fixed_server.py
View file @
efb695be
...
...
@@ -3,7 +3,6 @@ from scenarios import *
conf
=
"fixed_server"
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='get' id='idwhatever' from='{jid_one}/{resource_one}' to='{biboumi_host}'><query xmlns='http://jabber.org/protocol/disco#items' node='http://jabber.org/protocol/commands' /></iq>"
),
expect_stanza
(
"/iq[@type='result']/disco_items:query[@node='http://jabber.org/protocol/commands']"
,
"/iq/disco_items:query/disco_items:item[@node='global-configure']"
,
...
...
tests/end_to_end/scenarios/list_adhoc_irc.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='get' id='idwhatever' from='{jid_one}/{resource_one}' to='{irc_host_one}@{biboumi_host}'><query xmlns='http://jabber.org/protocol/disco#items' node='http://jabber.org/protocol/commands' /></iq>"
),
expect_stanza
(
"/iq[@type='result']/disco_items:query[@node='http://jabber.org/protocol/commands']"
,
"/iq/disco_items:query/disco_items:item[2]"
,
...
...
tests/end_to_end/scenarios/list_admin_adhoc.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='get' id='idwhatever' from='{jid_admin}/{resource_one}' to='{biboumi_host}'><query xmlns='http://jabber.org/protocol/disco#items' node='http://jabber.org/protocol/commands' /></iq>"
),
expect_stanza
(
"/iq[@type='result']/disco_items:query[@node='http://jabber.org/protocol/commands']"
,
"/iq/disco_items:query/disco_items:item[@node='configure']"
,
...
...
tests/end_to_end/scenarios/list_admin_adhoc_fixed_server.py
View file @
efb695be
...
...
@@ -3,7 +3,6 @@ from scenarios import *
conf
=
"fixed_server"
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='get' id='idwhatever' from='{jid_admin}/{resource_one}' to='{biboumi_host}'><query xmlns='http://jabber.org/protocol/disco#items' node='http://jabber.org/protocol/commands' /></iq>"
),
expect_stanza
(
"/iq[@type='result']/disco_items:query[@node='http://jabber.org/protocol/commands']"
,
"/iq/disco_items:query/disco_items:item[@node='global-configure']"
,
...
...
tests/end_to_end/scenarios/list_muc_user_adhoc.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='get' id='idwhatever' from='{jid_admin}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}'><query xmlns='http://jabber.org/protocol/disco#items' node='http://jabber.org/protocol/commands' /></iq>"
),
expect_stanza
(
"/iq[@type='error']/error[@type='cancel']/stanza:feature-not-implemented"
),
)
tests/end_to_end/scenarios/muc_disco_info.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}' id='1' type='get'><query xmlns='http://jabber.org/protocol/disco#info'/></iq>"
),
expect_stanza
(
"/iq[@from='#foo%{irc_server_one}'][@to='{jid_one}/{resource_one}'][@type='result']/disco_info:query"
,
"/iq[@type='result']/disco_info:query/disco_info:identity[@category='conference'][@type='irc'][@name='#foo on {irc_host_one}']"
,
...
...
tests/end_to_end/scenarios/muc_traffic_info.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}' id='1' type='get'><query xmlns='http://jabber.org/protocol/disco#info' node='http://jabber.org/protocol/muc#traffic'/></iq>"
),
expect_stanza
(
"/iq[@from='#foo%{irc_server_one}'][@to='{jid_one}/{resource_one}'][@type='result']/disco_info:query[@node='http://jabber.org/protocol/muc#traffic']"
),
)
tests/end_to_end/scenarios/multiple_channels_join.py
View file @
efb695be
...
...
@@ -3,8 +3,6 @@ from scenarios import *
from
scenarios.simple_channel_join
import
expect_self_join_presence
scenario
=
(
sequences
.
handshake
(),
# Join 3 rooms, on the same server, with three different nicks
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"
),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#bar%{irc_server_one}/{nick_two}' />"
),
...
...
tests/end_to_end/scenarios/multisessionnick.py
View file @
efb695be
...
...
@@ -3,8 +3,6 @@ from scenarios import *
from
scenarios.simple_channel_join
import
expect_self_join_presence
scenario
=
(
sequences
.
handshake
(),
# Resource one joins a channel
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(),
...
...
tests/end_to_end/scenarios/nick_change_in_join.py
View file @
efb695be
...
...
@@ -3,7 +3,6 @@ from scenarios import *
from
scenarios.simple_channel_join
import
expect_self_join_presence
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(),
expect_self_join_presence
(
jid
=
'{jid_one}/{resource_one}'
,
chan
=
"#foo"
,
nick
=
"{nick_one}"
),
...
...
tests/end_to_end/scenarios/not_connected_error.py
View file @
efb695be
...
...
@@ -3,7 +3,6 @@ from scenarios import *
from
scenarios.simple_channel_join
import
expect_self_join_presence
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence type='unavailable' from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"
),
# Fixme: what is the purpose of this test? Check that we don’t receive anything here…?
...
...
tests/end_to_end/scenarios/raw_message.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(
"irc.localhost"
,
'{jid_one}/{resource_one}'
),
expect_stanza
(
"/message"
),
...
...
tests/end_to_end/scenarios/raw_message_fixed_irc_server.py
View file @
efb695be
...
...
@@ -3,8 +3,6 @@ from scenarios import *
conf
=
'fixed_server'
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(
"irc.localhost"
,
'{jid_one}/{resource_one}'
,
fixed_irc_server
=
True
),
expect_stanza
(
"/message"
),
...
...
tests/end_to_end/scenarios/resource_is_removed_from_server_when_last_chan_is_left.py
View file @
efb695be
...
...
@@ -2,7 +2,6 @@ from scenarios import *
scenario
=
(
# Join the channel
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(
"irc.localhost"
,
'{jid_one}/{resource_one}'
),
expect_stanza
(
"/message/body[text()='Mode #foo [+nt] by {irc_host_one}']"
),
...
...
tests/end_to_end/scenarios/self_disco_info.py
View file @
efb695be
from
scenarios
import
*
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<iq type='get' id='get1' from='{jid_one}/{resource_one}' to='{biboumi_host}'><query xmlns='http://jabber.org/protocol/disco#info'/></iq>"
),
expect_stanza
(
"/iq[@type='result']/disco_info:query/disco_info:identity[@category='conference'][@type='irc'][@name='Biboumi XMPP-IRC gateway']"
,
"/iq/disco_info:query/disco_info:feature[@var='jabber:iq:version']"
,
...
...
tests/end_to_end/scenarios/simple_channel_join.py
View file @
efb695be
...
...
@@ -12,7 +12,6 @@ def expect_self_join_presence(jid, chan, nick, irc_server="{irc_server_one}"):
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"
),
sequences
.
connection
(),
...
...
tests/end_to_end/scenarios/simple_channel_join_fixed.py
View file @
efb695be
...
...
@@ -3,7 +3,6 @@ from scenarios import *
conf
=
"fixed_server"
scenario
=
(
sequences
.
handshake
(),
send_stanza
(
"<presence from='{jid_one}/{resource_one}' to='#foo@{biboumi_host}/{nick_one}' />"
),
sequences
.
connection
(
"irc.localhost"
,
'{jid_one}/{resource_one}'
,
fixed_irc_server
=
True
),
expect_stanza
(
"/message/body[text()='Mode #foo [+nt] by {irc_host_one}']"
),
...
...
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