From a4512cd3ae7294cf8872fd45e4b4783bddd48ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 15 Jan 2021 12:33:18 +0100 Subject: sasl: Use the nick from the presence if the ad-hoc one is not set fix #3450 --- tests/end_to_end/scenarios/sasl.py | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/end_to_end/scenarios/sasl.py b/tests/end_to_end/scenarios/sasl.py index b3cc62d..9f2a27a 100644 --- a/tests/end_to_end/scenarios/sasl.py +++ b/tests/end_to_end/scenarios/sasl.py @@ -40,14 +40,41 @@ scenario = ( send_stanza(""), expect_stanza("/presence[@type='unavailable']"), - # Configure an INCORRECT password + # Leave the same password, but remove the Nick send_stanza(""), expect_stanza("/iq[@type='result']/commands:command[@node='configure'][@sessionid][@status='executing']", "/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-private'][@var='sasl_password']", after = save_value("sessionid", extract_attribute("/iq[@type='result']/commands:command[@node='configure']", "sessionid"))), - send_stanza("" + "" + "" + "P4SSW0RD" + "6667" + "" + "66976670" + "9999" + ""), + expect_stanza("/iq[@type='result']/commands:command[@node='configure'][@status='completed']/commands:note[@type='info'][text()='Configuration successfully applied.']"), + + # Joining a channel with the associated nick will work, it will use the one from our + send_stanza(""), + sequences.connection(login="RegisteredUser"), + expect_stanza("/presence"), + expect_stanza("/message/subject"), + + # Leave the channel and disconnect from the server to try again differently + send_stanza(""), + expect_stanza("/presence[@type='unavailable']"), + + # Configure an INCORRECT password + send_stanza(""), + expect_stanza("/iq[@type='result']/commands:command[@node='configure'][@sessionid][@status='executing']", + "/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-private'][@var='sasl_password']", + after = save_value("sessionid", extract_attribute("/iq[@type='result']/commands:command[@node='configure']", "sessionid"))), + + + send_stanza("" "" "" "wrong wrong wrong" -- cgit v1.2.3