Comparison

mod_bookmarks2/tests/conversion.scs @ 3744:1cfc8012a76f

mod_bookmarks2: Add tests.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 13 Nov 2019 16:57:35 +0100
child 4640:d835cb7d2b47
comparison
equal deleted inserted replaced
3743:5eab799b5fa4 3744:1cfc8012a76f
1 # Pubsub: Bookmarks 2.0
2
3 [Client] Juliet-old
4 jid: admin@localhost
5 password: password
6
7 [Client] Juliet-new
8 jid: admin@localhost
9 password: password
10
11 // admin@localhost is assumed to have node creation privileges
12
13 ---------
14
15 Juliet-new connects
16
17 -- Generated with https://gitlab.com/xmpp-rs/xmpp-parsers:
18 -- cargo run --example=generate-caps https://code.matthewwild.co.uk/scansion/ <<< "<query xmlns='http://jabber.org/protocol/disco#info'><identity category='client' name='scansion' type='bot'/><feature var='http://jabber.org/protocol/disco#info'/><feature var='urn:xmpp:bookmarks:0+notify'/></query>"
19 Juliet-new sends:
20 <presence id='presence0'>
21 <c xmlns='http://jabber.org/protocol/caps'
22 hash='sha-1'
23 node='https://code.matthewwild.co.uk/scansion/'
24 ver='Tg9qGTn5+LdKR6TTdjCUMVohBMc='/>
25 <c xmlns='urn:xmpp:caps'>
26 <hash xmlns='urn:xmpp:hashes:2' algo='sha-256'>5a5oTk21S9EmWQGIyuMwPKuSkPwqmXv6aKO5ftqCw/Q=</hash>
27 <hash xmlns='urn:xmpp:hashes:2' algo='sha3-256'>f3ziwT4vDK+VxuWrhhPEEgI3HJcEw7Zg4MggYE6vjZ0=</hash>
28 </c>
29 </presence>
30
31 Juliet-new receives:
32 <iq from="${Juliet-new's JID}" id='disco' type='get'>
33 <query xmlns='http://jabber.org/protocol/disco#info' node='https://code.matthewwild.co.uk/scansion/#Tg9qGTn5+LdKR6TTdjCUMVohBMc='/>
34 </iq>
35
36 Juliet-new sends:
37 <iq to="${Juliet-new's JID}" id='disco' type='result'>
38 <query xmlns='http://jabber.org/protocol/disco#info' node='https://code.matthewwild.co.uk/scansion/#Tg9qGTn5+LdKR6TTdjCUMVohBMc='>
39 <identity category='client' name='scansion' type='bot'/>
40 <feature var='http://jabber.org/protocol/disco#info'/>
41 <feature var='urn:xmpp:bookmarks:0+notify'/>
42 </query>
43 </iq>
44
45 Juliet-old connects
46
47 Juliet-old sends:
48 <iq type='get' id='get0'>
49 <query xmlns='jabber:iq:private'>
50 <storage xmlns='storage:bookmarks'/>
51 </query>
52 </iq>
53
54 Juliet-old receives:
55 <iq type='result' id='get0'>
56 <query xmlns='jabber:iq:private'>
57 <storage xmlns='storage:bookmarks'/>
58 </query>
59 </iq>
60
61 Juliet-old sends:
62 <iq type='set' id='pub0'>
63 <query xmlns='jabber:iq:private'>
64 <storage xmlns='storage:bookmarks'>
65 <conference name='The Play&apos;s the Thing'
66 autojoin='true'
67 jid='theplay@conference.shakespeare.lit'>
68 <nick>JC</nick>
69 </conference>
70 </storage>
71 </query>
72 </iq>
73
74 Juliet-new receives:
75 <message type='headline' from="${Juliet-new's JID}">
76 <event xmlns='http://jabber.org/protocol/pubsub#event'>
77 <items node='urn:xmpp:bookmarks:0'>
78 <item id='theplay@conference.shakespeare.lit'>
79 <conference xmlns='urn:xmpp:bookmarks:0'
80 name='The Play&apos;s the Thing'
81 autojoin='true'>
82 <nick>JC</nick>
83 </conference>
84 </item>
85 </items>
86 </event>
87 </message>
88
89 Juliet-old receives:
90 <iq type='result' id='pub0'/>
91
92 Juliet-old sends:
93 <iq type='get' id='get1'>
94 <query xmlns='jabber:iq:private'>
95 <storage xmlns='storage:bookmarks'/>
96 </query>
97 </iq>
98
99 Juliet-old receives:
100 <iq type='result' id='get1'>
101 <query xmlns='jabber:iq:private'>
102 <storage xmlns='storage:bookmarks'>
103 <conference name='The Play&apos;s the Thing'
104 autojoin='true'
105 jid='theplay@conference.shakespeare.lit'>
106 <nick>JC</nick>
107 </conference>
108 </storage>
109 </query>
110 </iq>
111
112 Juliet-old sends:
113 <iq type='set' id='pub1'>
114 <query xmlns='jabber:iq:private'>
115 <storage xmlns='storage:bookmarks'>
116 <conference name='The Play&apos;s the Thing'
117 autojoin='true'
118 jid='theplay@conference.shakespeare.lit'>
119 <nick>JC</nick>
120 </conference>
121 <conference name='The Orchard'
122 autojoin='true'
123 jid='orchard@conference.shakespeare.lit'>
124 <nick>JC</nick>
125 </conference>
126 </storage>
127 </query>
128 </iq>
129
130 Juliet-new receives:
131 <message type='headline' from="${Juliet-new's JID}">
132 <event xmlns='http://jabber.org/protocol/pubsub#event'>
133 <items node='urn:xmpp:bookmarks:0'>
134 <item id='orchard@conference.shakespeare.lit'>
135 <conference xmlns='urn:xmpp:bookmarks:0'
136 name='The Orchard'
137 autojoin='true'>
138 <nick>JC</nick>
139 </conference>
140 </item>
141 </items>
142 </event>
143 </message>
144
145 Juliet-old receives:
146 <iq type='result' id='pub1'/>
147
148 Juliet-old sends:
149 <iq type='get' id='get2'>
150 <query xmlns='jabber:iq:private'>
151 <storage xmlns='storage:bookmarks'/>
152 </query>
153 </iq>
154
155 Juliet-old receives:
156 <iq type='result' id='get2'>
157 <query xmlns='jabber:iq:private'>
158 <storage xmlns='storage:bookmarks'>
159 <conference name='The Play&apos;s the Thing'
160 autojoin='true'
161 jid='theplay@conference.shakespeare.lit'>
162 <nick>JC</nick>
163 </conference>
164 <conference name='The Orchard'
165 autojoin='true'
166 jid='orchard@conference.shakespeare.lit'>
167 <nick>JC</nick>
168 </conference>
169 </storage>
170 </query>
171 </iq>
172
173 Juliet-old sends:
174 <iq type='set' id='retract0'>
175 <query xmlns='jabber:iq:private'>
176 <storage xmlns='storage:bookmarks'>
177 <conference name='The Orchard'
178 autojoin='true'
179 jid='orchard@conference.shakespeare.lit'>
180 <nick>JC</nick>
181 </conference>
182 </storage>
183 </query>
184 </iq>
185
186 Juliet-new receives:
187 <message type='headline' from="${Juliet-new's JID}">
188 <event xmlns='http://jabber.org/protocol/pubsub#event'>
189 <items node='urn:xmpp:bookmarks:0'>
190 <retract id='theplay@conference.shakespeare.lit'/>
191 </items>
192 </event>
193 </message>
194
195 Juliet-old receives:
196 <iq type='result' id='retract0'/>
197
198 Juliet-old sends:
199 <iq type='get' id='get3'>
200 <query xmlns='jabber:iq:private'>
201 <storage xmlns='storage:bookmarks'/>
202 </query>
203 </iq>
204
205 Juliet-old receives:
206 <iq type='result' id='get3'>
207 <query xmlns='jabber:iq:private'>
208 <storage xmlns='storage:bookmarks'>
209 <conference name='The Orchard'
210 autojoin='true'
211 jid='orchard@conference.shakespeare.lit'>
212 <nick>JC</nick>
213 </conference>
214 </storage>
215 </query>
216 </iq>
217
218 Juliet-old sends:
219 <iq type='set' id='purge0'>
220 <query xmlns='jabber:iq:private'>
221 <storage xmlns='storage:bookmarks'/>
222 </query>
223 </iq>
224
225 Juliet-new receives:
226 <message type='headline' from="${Juliet-new's JID}">
227 <event xmlns='http://jabber.org/protocol/pubsub#event'>
228 <purge node='urn:xmpp:bookmarks:0'/>
229 </event>
230 </message>
231
232 Juliet-old receives:
233 <iq type='result' id='purge0'/>
234
235 Juliet-old sends:
236 <iq type='get' id='get4'>
237 <query xmlns='jabber:iq:private'>
238 <storage xmlns='storage:bookmarks'/>
239 </query>
240 </iq>
241
242 Juliet-old receives:
243 <iq type='result' id='get4'>
244 <query xmlns='jabber:iq:private'>
245 <storage xmlns='storage:bookmarks'/>
246 </query>
247 </iq>
248
249 Juliet-old disconnects
250
251 Juliet-new disconnects
252
253 // vim: syntax=xml: