spec/scansion/basic_roster.scs
author Kim Alvefur <zash@zash.se>
Wed, 27 Mar 2024 19:33:11 +0100
changeset 13471 c2a476f4712a
parent 9308 f14c81fd44a4
permissions -rw-r--r--
util.startup: Fix exiting on pidfile trouble prosody.shutdown() relies on prosody.main_thread, which has not been set yet at this point. Doing a clean shutdown might actually be harmful in case it tears down things set up by the conflicting Prosody, such as the very pidfile we were looking at. Thanks again SigmaTel71 for noticing

# Basic roster test

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

[Client] Juliet
	jid: juliet@localhost
	password: password

---------

Romeo connects

Juliet connects

Romeo sends:
	<presence/>

Romeo receives:
	<presence from="${Romeo's full JID}" />

Romeo sends:
	<iq type="get" id="roster1">
		<query xmlns='jabber:iq:roster'/>
	</iq>

Romeo receives:
	<iq type="result" id="roster1">
		<query ver='{scansion:any}' xmlns="jabber:iq:roster"/>
	</iq>

# Add nurse to roster

Romeo sends:
	<iq type="set" id="roster2">
		<query xmlns="jabber:iq:roster">
			<item jid='nurse@localhost'/>
		</query>
	</iq>

# Receive the roster add result

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

# Receive the roster push

Romeo receives:
	<iq type="set" id="{scansion:any}">
		<query xmlns='jabber:iq:roster' ver='{scansion:any}'>
			<item jid='nurse@localhost' subscription='none'/>
		</query>
	</iq>

Romeo sends:
	<iq type="result" id="fixme"/>

# Fetch the roster, it should include nurse now

Romeo sends:
	<iq type="get" id="roster3">
		<query xmlns='jabber:iq:roster'/>
	</iq>

Romeo receives:
	<iq type="result" id="roster3">
		<query xmlns='jabber:iq:roster' ver="{scansion:any}">
			<item subscription='none' jid='nurse@localhost'/>
		</query>
	</iq>

Romeo disconnects