scripts/pubsub_createdelete.scs

Fri, 19 Feb 2016 11:48:31 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 19 Feb 2016 11:48:31 +0000
changeset 84
c9061cd9951b
parent 36
b1d7a274d250
permissions
-rw-r--r--

client: Support for "receives: nothing", to verify that the server does not respond to a given stanza, for example

[Client] Romeo
	jid: admin@localhost
	password: password

// admin@localhost is assumed to have node creation privileges

---------

Romeo connects

Romeo sends:
	<iq type="set" to="pubsub.localhost">
		<pubsub xmlns="http://jabber.org/protocol/pubsub">
			<create node="princely_musings"/>
		</pubsub>
	</iq>

Romeo receives:
	<iq type="result"/>

Romeo sends:
	<iq type="set" to="pubsub.localhost">
		<pubsub xmlns="http://jabber.org/protocol/pubsub">
			<create node="princely_musings"/>
		</pubsub>
	</iq>

Romeo receives:
	<iq type="error">
		<error type="cancel">
			<conflict xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
		</error>
	</iq>

Romeo sends:
	<iq type="set" to="pubsub.localhost">
		<pubsub xmlns="http://jabber.org/protocol/pubsub#owner">
			<delete node="princely_musings"/>
		</pubsub>
	</iq>

Romeo receives:
	<iq type="result"/>

Romeo sends:
	<iq type="set" to="pubsub.localhost">
		<pubsub xmlns="http://jabber.org/protocol/pubsub#owner">
			<delete node="princely_musings"/>
		</pubsub>
	</iq>

Romeo receives:
	<iq type="error">
		<error type="cancel">
			<item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
		</error>
	</iq>

Romeo disconnects

// vim: syntax=xml:

mercurial