Comparison

spec/scansion/muc_password.scs @ 9266:c5267f5fd6e6

spec/scansion: Add scansion scripts used for testing All past, except issue978-multi which fails randomly based on ordering of elements - this is a scansion issue to be resolved.
author Matthew Wild <mwild1@gmail.com>
date Thu, 06 Sep 2018 16:44:48 +0100
child 9290:decdaaf78f32
comparison
equal deleted inserted replaced
9265:585ef5c1b226 9266:c5267f5fd6e6
1 # MUC password test
2 # Ensures that setting and unsetting a MUC password works, and that the password is
3 # required to join a password-protected room.
4
5 ## prosody-0.9 result: fails because of missing 201 status code (related to issue #328)
6 ## prosody-0.10 result: fails because of missing 201 status code (related to issue #328)
7
8 [Client] Romeo
9 jid: user@localhost
10 password: password
11
12 [Client] Juliet
13 jid: user2@localhost
14 password: password
15
16 -----
17
18 Romeo connects
19
20 Romeo sends:
21 <presence to="room@conference.localhost/Romeo">
22 <x xmlns="http://jabber.org/protocol/muc"/>
23 </presence>
24
25 Romeo receives:
26 <presence from='room@conference.localhost/Romeo'>
27 <x xmlns='http://jabber.org/protocol/muc#user'>
28 <status code='201'/>
29 <item jid="${Romeo's full JID}" affiliation='owner' role='moderator'/>
30 <status code='110'/>
31 </x>
32 </presence>
33
34 Romeo receives:
35 <message type='groupchat' from='room@conference.localhost'><subject/></message>
36
37 # Submit config form
38 Romeo sends:
39 <iq id='config1' to='room@conference.localhost' type='set'>
40 <query xmlns='http://jabber.org/protocol/muc#owner'>
41 <x xmlns='jabber:x:data' type='submit'>
42 <field var='FORM_TYPE'>
43 <value>http://jabber.org/protocol/muc#roomconfig</value>
44 </field>
45 <field var='muc#roomconfig_roomsecret'>
46 <value>cauldronburn</value>
47 </field>
48 </x>
49 </query>
50 </iq>
51
52 Romeo receives:
53 <iq id="config1" from="room@conference.localhost" type="result">
54 </iq>
55
56 # Juliet connects, and tries to join the room (password-protected)
57 Juliet connects
58
59 Juliet sends:
60 <presence to="room@conference.localhost/Juliet">
61 <x xmlns="http://jabber.org/protocol/muc"/>
62 </presence>
63
64 Juliet receives:
65 <presence from="room@conference.localhost/Juliet" type="error">
66 <error type="auth">
67 <not-authorized xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
68 </error>
69 </presence>
70
71 # Retry with the correct password
72 Juliet sends:
73 <presence to="room@conference.localhost/Juliet">
74 <x xmlns="http://jabber.org/protocol/muc">
75 <password>cauldronburn</password>
76 </x>
77 </presence>
78
79 Juliet receives:
80 <presence from="room@conference.localhost/Romeo" />
81
82 Juliet receives:
83 <presence from="room@conference.localhost/Juliet" />
84
85 Juliet receives:
86 <message type='groupchat' from='room@conference.localhost'><subject/></message>
87
88 Romeo receives:
89 <presence from="room@conference.localhost/Juliet" />
90
91 # Ok, now Juliet leaves, and Romeo unsets the password
92
93 Juliet sends:
94 <presence type="unavailable" to="room@conference.localhost"/>
95
96 Romeo receives:
97 <presence type="unavailable" from="room@conference.localhost/Juliet"/>
98
99 Juliet receives:
100 <presence type="unavailable" from="room@conference.localhost/Juliet"/>
101
102 # Remove room password
103 Romeo sends:
104 <iq id='config2' to='room@conference.localhost' type='set'>
105 <query xmlns='http://jabber.org/protocol/muc#owner'>
106 <x xmlns='jabber:x:data' type='submit'>
107 <field var='FORM_TYPE'>
108 <value>http://jabber.org/protocol/muc#roomconfig</value>
109 </field>
110 <field var='muc#roomconfig_roomsecret'>
111 <value></value>
112 </field>
113 </x>
114 </query>
115 </iq>
116
117 # Config change success
118 Romeo receives:
119 <iq id="config2" from="room@conference.localhost" type="result">
120 </iq>
121
122 # Notification of room configuration update
123 Romeo receives:
124 <message type='groupchat' from='room@conference.localhost'>
125 <x xmlns='http://jabber.org/protocol/muc#user'>
126 <status code='104'/>
127 </x>
128 </message>
129
130 # Juliet tries to join (should succeed)
131 Juliet sends:
132 <presence to="room@conference.localhost/Juliet">
133 <x xmlns="http://jabber.org/protocol/muc"/>
134 </presence>
135
136 # Notification of Romeo's presence in the room
137 Juliet receives:
138 <presence from="room@conference.localhost/Romeo" />
139
140 Juliet receives:
141 <presence from="room@conference.localhost/Juliet" />
142
143 # Room topic
144 Juliet receives:
145 <message type='groupchat' from='room@conference.localhost'><subject/></message>
146
147 Romeo receives:
148 <presence from="room@conference.localhost/Juliet" />
149