Last active
July 9, 2018 23:14
-
-
Save ivucica/d85bcc2e61fa3f6c48ec0dc85495e0fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test for Prosody bug 1082 | |
[Client] Romeo | |
jid: user@localhost | |
password: password | |
--------- | |
# Act 1, scene 1 | |
# The clients connect | |
Romeo connects | |
# Create the microblog node. | |
Romeo sends: | |
<iq type="set" to="${Romeo's jid}" id="create1"> | |
<pubsub xmlns="http://jabber.org/protocol/pubsub"> | |
<create node="urn:xmpp:microblog:0"/> | |
</pubsub> | |
</iq> | |
Romeo receives: | |
<iq type="result"/> | |
# Confirm which options are available and that defaults are as expected. | |
Romeo sends: | |
<iq type='get' id="getopt1" | |
to='${Romeo's jid}'> | |
<pubsub xmlns='http://jabber.org/protocol/pubsub#owner'> | |
<configure node='urn:xmpp:microblog:0'/> | |
</pubsub> | |
</iq> | |
Romeo receives: | |
<iq type='result'> | |
<pubsub xmlns='http://jabber.org/protocol/pubsub#owner'> | |
<configure node='urn:xmpp:microblog:0'> | |
<x type='form' xmlns='jabber:x:data'> | |
<field type='hidden' var='FORM_TYPE'> | |
<value>http://jabber.org/protocol/pubsub#node_config</value> | |
</field> | |
<field type='text-single' label='Title' var='pubsub#title'/> | |
<field type='text-single' label='Description' var='pubsub#description'/> | |
<field type='text-single' label='Max # of items to persist' var='pubsub#max_items'> | |
<value>1</value> | |
</field> | |
<field type='boolean' label='Persist items to storage' var='pubsub#persist_items'> | |
<value>1</value> | |
</field> | |
<field type='boolean' label='Receive message body in addition to payload?' var='pubsub#include_body'/> | |
<field type='list-single' label='Specify the delivery style for notifications' var='pubsub#notification_type'/> | |
</x> | |
</configure> | |
</pubsub> | |
</iq> | |
# Set max items to 50. | |
Romeo sends: | |
<iq type='set' id="setopt1" | |
to='${Romeo's jid}'> | |
<pubsub xmlns='http://jabber.org/protocol/pubsub#owner'> | |
<configure node='urn:xmpp:microblog:0'> | |
<x xmlns='jabber:x:data' type='submit'> | |
<field var='FORM_TYPE' type='hidden'> | |
<value>http://jabber.org/protocol/pubsub#node_config</value> | |
</field> | |
<field var='pubsub#persist_items'><value>1</value></field> | |
<field var='pubsub#max_items'><value>50</value></field> | |
</x> | |
</configure> | |
</pubsub> | |
</iq> | |
Romeo receives: | |
<iq type="result"/> | |
# Confirm the new value for max_items. | |
Romeo sends: | |
<iq type='get' to='${Romeo's jid}' id="getopt2"> | |
<pubsub xmlns='http://jabber.org/protocol/pubsub#owner'> | |
<configure node='urn:xmpp:microblog:0'/> | |
</pubsub> | |
</iq> | |
Romeo receives: | |
<iq type='result'> | |
<pubsub xmlns='http://jabber.org/protocol/pubsub#owner'> | |
<configure node='urn:xmpp:microblog:0'> | |
<x type='form' xmlns='jabber:x:data'> | |
<field type='hidden' var='FORM_TYPE'> | |
<value>http://jabber.org/protocol/pubsub#node_config</value> | |
</field> | |
<field type='text-single' label='Title' var='pubsub#title'/> | |
<field type='text-single' label='Description' var='pubsub#description'/> | |
<field type='text-single' label='Max # of items to persist' var='pubsub#max_items'> | |
<value>50</value> | |
</field> | |
<field type='boolean' label='Persist items to storage' var='pubsub#persist_items'> | |
<value>1</value> | |
</field> | |
<field type='boolean' label='Receive message body in addition to payload?' var='pubsub#include_body'/> | |
<field type='list-single' label='Specify the delivery style for notifications' var='pubsub#notification_type'/> | |
</x> | |
</configure> | |
</pubsub> | |
</iq> | |
# Create post 1. | |
Romeo sends: | |
<iq to='${Romeo's jid}' id="create1" | |
type='set'> | |
<pubsub xmlns='http://jabber.org/protocol/pubsub'> | |
<publish node='urn:xmpp:microblog:0'> | |
<item id='1cb57d9c-1c46-11dd-838c-001143d5d5db'> | |
<entry xmlns='http://www.w3.org/2005/Atom'> | |
<title type='text'>hanging out at the Caf&#233; Napolitano</title> | |
<id>tag:montague.lit,2008-05-08:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db</id> | |
<published>2008-05-08T18:30:02Z</published> | |
<updated>2008-05-08T18:30:02Z</updated> | |
</entry> | |
</item> | |
</publish> | |
</pubsub> | |
</iq> | |
Romeo receives: | |
<iq type='result'> | |
<pubsub xmlns='http://jabber.org/protocol/pubsub'> | |
<publish node='urn:xmpp:microblog:0'> | |
<item id='1cb57d9c-1c46-11dd-838c-001143d5d5db'/> | |
</publish> | |
</pubsub> | |
</iq> | |
# Confirm we this message is stored and returned. | |
Romeo sends: | |
<iq type='get' id="getitems1" | |
to='${Romeo's jid}'> | |
<pubsub xmlns='http://jabber.org/protocol/pubsub'> | |
<items node='urn:xmpp:microblog:0'/> | |
</pubsub> | |
</iq> | |
Romeo receives: | |
<iq type='result'> | |
<pubsub xmlns='http://jabber.org/protocol/pubsub'> | |
<items node='urn:xmpp:microblog:0'> | |
<item id='1cb57d9c-1c46-11dd-838c-001143d5d5db' xmlns='http://jabber.org/protocol/pubsub'> | |
<entry xmlns='http://www.w3.org/2005/Atom'> | |
<title type='text'>hanging out at the Caf&#233; Napolitano</title> | |
<id>tag:montague.lit,2008-05-08:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db</id> | |
<published>2008-05-08T18:30:02Z</published> | |
<updated>2008-05-08T18:30:02Z</updated> | |
</entry> | |
</item> | |
</items> | |
</pubsub> | |
</iq> | |
# Create post 2. | |
Romeo sends: | |
<iq to='${Romeo's jid}' id="create2" | |
type='set'> | |
<pubsub xmlns='http://jabber.org/protocol/pubsub'> | |
<publish node='urn:xmpp:microblog:0'> | |
<item id='1cb57d9c-1c46-11dd-838c-001143d5d5aa'> | |
<entry xmlns='http://www.w3.org/2005/Atom'> | |
<title type='text'>hanging out at the Caf&#233; Napolitano MESSAGE TWO</title> | |
<id>tag:montague.lit,2008-05-09:posts-1cb57d9c-1c46-11dd-838c-001143d5d5aa</id> | |
<published>2008-05-09T18:30:02Z</published> | |
<updated>2008-05-09T18:30:02Z</updated> | |
</entry> | |
</item> | |
</publish> | |
</pubsub> | |
</iq> | |
Romeo receives: | |
<iq type='result'> | |
<pubsub xmlns='http://jabber.org/protocol/pubsub'> | |
<publish node='urn:xmpp:microblog:0'> | |
<item id='1cb57d9c-1c46-11dd-838c-001143d5d5aa'/> | |
</publish> | |
</pubsub> | |
</iq> | |
# Confirm both posts are returned. | |
Romeo sends: | |
<iq type='get' id="getitems2" | |
to='${Romeo's jid}'> | |
<pubsub xmlns='http://jabber.org/protocol/pubsub'> | |
<items node='urn:xmpp:microblog:0'/> | |
</pubsub> | |
</iq> | |
Romeo receives: | |
<iq type='result'> | |
<pubsub xmlns='http://jabber.org/protocol/pubsub'> | |
<items node='urn:xmpp:microblog:0'> | |
<item id='1cb57d9c-1c46-11dd-838c-001143d5d5db' xmlns='http://jabber.org/protocol/pubsub'> | |
<entry xmlns='http://www.w3.org/2005/Atom'> | |
<title type='text'>hanging out at the Caf&#233; Napolitano</title> | |
<id>tag:montague.lit,2008-05-08:posts-1cb57d9c-1c46-11dd-838c-001143d5d5db</id> | |
<published>2008-05-08T18:30:02Z</published> | |
<updated>2008-05-08T18:30:02Z</updated> | |
</entry> | |
</item> | |
<item id='1cb57d9c-1c46-11dd-838c-001143d5d5aa' xmlns='http://jabber.org/protocol/pubsub'> | |
<entry xmlns='http://www.w3.org/2005/Atom'> | |
<title type='text'>hanging out at the Caf&#233; Napolitano MESSAGE TWO</title> | |
<id>tag:montague.lit,2008-05-09:posts-1cb57d9c-1c46-11dd-838c-001143d5d5aa</id> | |
<published>2008-05-09T18:30:02Z</published> | |
<updated>2008-05-09T18:30:02Z</updated> | |
</entry> | |
</item> | |
</items> | |
</pubsub> | |
</iq> | |
# Delete the node for future use. | |
Romeo sends: | |
<iq type="set" to="${Romeo's jid}" id="del1"> | |
<pubsub xmlns="http://jabber.org/protocol/pubsub#owner"> | |
<delete node="urn:xmpp:microblog:0"/> | |
</pubsub> | |
</iq> | |
Romeo receives: | |
<iq type="result"/> | |
Romeo disconnects | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment