spec/scansion/vcard_temp.scs
author Kim Alvefur <zash@zash.se>
Sat, 23 Mar 2024 20:48:19 +0100
changeset 13465 c673ff1075bd
parent 12971 53b0730093d8
permissions -rw-r--r--
mod_posix: Move everything to util.startup This allows greater control over the order of events. Notably, the internal ordering between daemonization, initialization of libunbound and setup of signal handling is sensitive. libunbound starts a separate thread for processing DNS requests. If this thread is started before signal handling has been set up, it will not inherit the signal handlers and instead behave as it would have before signal handlers were set up, i.e. cause the whole process to immediately exit. libunbound is usually initialized on the first DNS request, usually triggered by an outgoing s2s connection attempt. If daemonization happens before signals have been set up, signals may not be processed at all.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9525
4ea7298d3401 tests: Set a proper title for vCard test
Kim Alvefur <zash@zash.se>
parents: 9524
diff changeset
     1
# XEP-0054 vCard-temp writable and readable by anyone
9524
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     2
# mod_scansion_record on host 'localhost' recording started 2018-10-20T15:00:12Z
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     3
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     4
[Client] Romeo
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     5
	jid: romeo@localhost
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     6
	password: password
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     7
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     8
[Client] Juliet
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
     9
	jid: juliet@localhost
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    10
	password: password
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    11
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    12
-----
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    13
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    14
Romeo connects
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    15
9527
1f6f3b941eb1 tests: Add some comments to xep54 test
Kim Alvefur <zash@zash.se>
parents: 9526
diff changeset
    16
# Romeo sets his vCard
1f6f3b941eb1 tests: Add some comments to xep54 test
Kim Alvefur <zash@zash.se>
parents: 9526
diff changeset
    17
# FN and N are required by the schema and mod_vcard_legacy will always inject them
9524
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    18
Romeo sends:
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    19
	<iq id="lx3" type="set">
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    20
		<vCard xmlns="vcard-temp">
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    21
			<FN>Romeo Montague</FN>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    22
			<N>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    23
				<FAMILY>Montague</FAMILY>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    24
				<GIVEN>Romeo</GIVEN>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    25
				<MIDDLE/>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    26
				<PREFIX/>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    27
				<SUFFIX/>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    28
			</N>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    29
		</vCard>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    30
	</iq>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    31
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    32
Romeo receives:
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    33
	<iq type="result" id="lx3" to="${Romeo's full JID}"/>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    34
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    35
Romeo sends:
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    36
	<iq id="lx4" type="get">
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    37
		<vCard xmlns="vcard-temp"/>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    38
	</iq>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    39
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    40
Romeo receives:
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    41
	<iq type="result" id="lx4" to="${Romeo's full JID}">
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    42
		<vCard xmlns="vcard-temp">
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    43
			<FN>Romeo Montague</FN>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    44
			<N>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    45
				<FAMILY>Montague</FAMILY>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    46
				<GIVEN>Romeo</GIVEN>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    47
				<MIDDLE/>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    48
				<PREFIX/>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    49
				<SUFFIX/>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    50
			</N>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    51
		</vCard>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    52
	</iq>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    53
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    54
Juliet connects
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    55
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    56
Juliet sends:
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    57
	<iq type="get" id="lx3" to="romeo@localhost">
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    58
		<vCard xmlns="vcard-temp"/>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    59
	</iq>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    60
9527
1f6f3b941eb1 tests: Add some comments to xep54 test
Kim Alvefur <zash@zash.se>
parents: 9526
diff changeset
    61
# Juliet can see Romeo's vCard since it's public
9524
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    62
Juliet receives:
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    63
	<iq type="result" from="romeo@localhost" id="lx3" to="${Juliet's full JID}">
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    64
		<vCard xmlns="vcard-temp">
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    65
			<FN>Romeo Montague</FN>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    66
			<N>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    67
				<FAMILY>Montague</FAMILY>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    68
				<GIVEN>Romeo</GIVEN>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    69
				<MIDDLE/>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    70
				<PREFIX/>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    71
				<SUFFIX/>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    72
			</N>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    73
		</vCard>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    74
	</iq>
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    75
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    76
Juliet disconnects
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    77
12971
53b0730093d8 scansion: vcard_temp: Ensure at least one connection is open throughout test
Matthew Wild <mwild1@gmail.com>
parents: 9527
diff changeset
    78
Romeo disconnects
53b0730093d8 scansion: vcard_temp: Ensure at least one connection is open throughout test
Matthew Wild <mwild1@gmail.com>
parents: 9527
diff changeset
    79
9524
e57f6cd1af50 tests: Add simple test case for XEP-0054
Kim Alvefur <zash@zash.se>
parents:
diff changeset
    80
# recording ended on 2018-10-20T15:02:14Z