=== Test case: rest_client_SUITE:add_contact_and_invite/1 (click for source code)
=== Config value:
[{watchdog,<0.84002.0>},
{muc_light_host,<<"muclight.localhost">>},
{mam_backend,rdbms},
{preset,"pgsql_cets"},
{mim_data_dir,"/home/circleci/project/big_tests/tests/rest_client_SUITE_data"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@81b4ed498ac1.2024-04-23_23.21.08/big_tests.tests.rest_client_SUITE.logs/run.2024-04-23_23.35.36/rest_client_suite.add_contact_and_invite.110340.html"},
{tc_group_properties,[{name,roster},parallel]},
{tc_group_path,[]},
{data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/rest_client_SUITE_data/"},
{priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@81b4ed498ac1.2024-04-23_23.21.08/big_tests.tests.rest_client_SUITE.logs/run.2024-04-23_23.35.36/log_private/"},
{{saved_modules,mongooseim@localhost,<<"localhost">>},
#{mod_vcard =>
#{matches => 30,
host => {prefix,<<"vjud.">>},
search => true,backend => rdbms,iqdisc => parallel},
mod_roster =>
#{backend => rdbms,iqdisc => one_queue,versioning => false,
store_current_id => false},
mod_register =>
#{access => register,iqdisc => one_queue,
registration_watchers => [],password_strength => 0,
ip_access => [{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}]},
mod_sic => #{iqdisc => one_queue},
mod_amp => #{},mod_presence => #{},
mod_disco =>
#{server_info => [],iqdisc => one_queue,extra_domains => [],
users_can_see_hidden_services => false},
mod_stream_management =>
#{buffer => true,ack => true,backend => cets,
stale_h =>
#{enabled => false,repeat_after => 1800,geriatric => 3600},
buffer_max => 100,ack_freq => 1,resume_timeout => 600},
mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
mod_bosh =>
#{backend => cets,inactivity => 30,max_pause => 120,
max_wait => infinity,server_acks => false},
mod_cache_users =>
#{strategy => fifo,number_of_segments => 5,time_to_live => 2},
mod_carboncopy => #{iqdisc => no_queue}}}]
=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@81b4ed498ac1.2024-04-23_23.21.08"
=== Started at 2024-04-23 23:35:38
*** User 2024-04-23 23:35:38.386 ***🔗
alicE_add_contact_and_invite_3023@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2024-04-23 23:35:38.386 ***🔗
alicE_add_contact_and_invite_3023@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='227a7f739d026a2f' from='localhost' version='1.0' xml:lang='en'>
*** User 2024-04-23 23:35:38.386 ***🔗
alicE_add_contact_and_invite_3023@localhost/res1 in
<stream:features>
<register xmlns='http://jabber.org/features/iq-register'/>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2024-04-23 23:35:38.386 ***🔗
alicE_add_contact_and_invite_3023@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzAyMwBtYXR5Z3J5c2E=</auth>
*** User 2024-04-23 23:35:38.387 ***🔗
alicE_add_contact_and_invite_3023@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2024-04-23 23:35:38.387 ***🔗
alicE_add_contact_and_invite_3023@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2024-04-23 23:35:38.387 ***🔗
alicE_add_contact_and_invite_3023@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='0efe1b28055d5159' from='localhost' version='1.0' xml:lang='en' to='alice_add_contact_and_invite_3023@localhost'>
*** User 2024-04-23 23:35:38.388 ***🔗
alicE_add_contact_and_invite_3023@localhost/res1 in
<stream:features>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2024-04-23 23:35:38.388 ***🔗
alicE_add_contact_and_invite_3023@localhost/res1 out
<iq type='set' id='26689ff8aac7d996c200e2c8c8ba7411'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2024-04-23 23:35:38.388 ***🔗
alicE_add_contact_and_invite_3023@localhost/res1 in
<iq id='26689ff8aac7d996c200e2c8c8ba7411' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alice_add_contact_and_invite_3023@localhost/res1</jid>
</bind>
</iq>
*** User 2024-04-23 23:35:38.388 ***🔗
alice_add_contact_and_invite_3023@localhost/res1 out
<iq type='set' id='503df43fa9bac0ab78be095ae24cdac5'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-23 23:35:38.389 ***🔗
alice_add_contact_and_invite_3023@localhost/res1 in
<iq from='localhost' to='alice_add_contact_and_invite_3023@localhost/res1' id='503df43fa9bac0ab78be095ae24cdac5' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-23 23:35:38.390 ***🔗
alice_add_contact_and_invite_3023@localhost/res1 out
<presence/>
*** User 2024-04-23 23:35:38.391 ***🔗
alice_add_contact_and_invite_3023@localhost/res1 in
<presence from='alice_add_contact_and_invite_3023@localhost/res1' to='alice_add_contact_and_invite_3023@localhost/res1'/>
*** User 2024-04-23 23:35:38.391 ***🔗
bOb_add_contact_and_invite_3023@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2024-04-23 23:35:38.392 ***🔗
bOb_add_contact_and_invite_3023@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b36e4f274c27d57a' from='localhost' version='1.0' xml:lang='en'>
*** User 2024-04-23 23:35:38.392 ***🔗
bOb_add_contact_and_invite_3023@localhost/res1 in
<stream:features>
<register xmlns='http://jabber.org/features/iq-register'/>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2024-04-23 23:35:38.392 ***🔗
bOb_add_contact_and_invite_3023@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9hZGRfY29udGFjdF9hbmRfaW52aXRlXzMwMjMAbWFrcm9saWth</auth>
*** User 2024-04-23 23:35:38.393 ***🔗
bOb_add_contact_and_invite_3023@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2024-04-23 23:35:38.393 ***🔗
bOb_add_contact_and_invite_3023@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2024-04-23 23:35:38.393 ***🔗
bOb_add_contact_and_invite_3023@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='14fdd19a3f808c9e' from='localhost' version='1.0' xml:lang='en' to='bob_add_contact_and_invite_3023@localhost'>
*** User 2024-04-23 23:35:38.393 ***🔗
bOb_add_contact_and_invite_3023@localhost/res1 in
<stream:features>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2024-04-23 23:35:38.393 ***🔗
bOb_add_contact_and_invite_3023@localhost/res1 out
<iq type='set' id='851ec96aa1162ceaa1664834b2a4bb1e'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2024-04-23 23:35:38.393 ***🔗
bOb_add_contact_and_invite_3023@localhost/res1 in
<iq id='851ec96aa1162ceaa1664834b2a4bb1e' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bob_add_contact_and_invite_3023@localhost/res1</jid>
</bind>
</iq>
*** User 2024-04-23 23:35:38.394 ***🔗
bob_add_contact_and_invite_3023@localhost/res1 out
<iq type='set' id='c6416c2aa7fe5d28193cdc70a9d88929'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-23 23:35:38.394 ***🔗
bob_add_contact_and_invite_3023@localhost/res1 in
<iq from='localhost' to='bob_add_contact_and_invite_3023@localhost/res1' id='c6416c2aa7fe5d28193cdc70a9d88929' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-23 23:35:38.394 ***🔗
bob_add_contact_and_invite_3023@localhost/res1 out
<presence/>
*** User 2024-04-23 23:35:38.396 ***🔗
bob_add_contact_and_invite_3023@localhost/res1 in
<presence from='bob_add_contact_and_invite_3023@localhost/res1' to='bob_add_contact_and_invite_3023@localhost/res1'/>
*** User 2024-04-23 23:35:38.403 ***🔗
REST request:
Code: 200
Req: {<0.84074.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"98702032fcb1c2e8">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzAyM0Bsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 23 Apr 2024 23:35:38 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"2">>}],
<<"[]">>,125,3024}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
body => <<>>,role => client,method => <<"GET">>,
creds =>
{<<"bob_add_contact_and_invite_3023@localhost">>,
<<"makrolika">>},
return_headers => true}
*** User 2024-04-23 23:35:38.428 ***🔗
REST request:
Code: 204
Req: {<0.84097.0>,<<"/api/contacts">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"801b4f7a6d2bfc59">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzAyM0Bsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<"{\"jid\":\"alice_add_contact_and_invite_3023@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 23 Apr 2024 23:35:38 GMT">>}],
<<>>,80,18727}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
body =>
<<"{\"jid\":\"alice_add_contact_and_invite_3023@localhost\"}">>,
role => client,method => <<"POST">>,
creds =>
{<<"bob_add_contact_and_invite_3023@localhost">>,
<<"makrolika">>},
return_headers => true}
*** User 2024-04-23 23:35:38.428 ***🔗
bob_add_contact_and_invite_3023@localhost/res1 in
<iq from='bob_add_contact_and_invite_3023@localhost' to='bob_add_contact_and_invite_3023@localhost/res1' id='pushda3eb223e4184bec' type='set'>
<query xmlns='jabber:iq:roster'>
<item jid='alice_add_contact_and_invite_3023@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-23 23:35:38.438 ***🔗
REST request:
Code: 200
Req: {<0.84131.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"c2cc40dfd468c136">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzAyM0Bsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 23 Apr 2024 23:35:38 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"90">>}],
<<"[{\"ask\":\"none\",\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_invite_3023@localhost\"}]">>,
214,2852}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
body => <<>>,role => client,method => <<"GET">>,
creds =>
{<<"bob_add_contact_and_invite_3023@localhost">>,
<<"makrolika">>},
return_headers => true}
*** User 2024-04-23 23:35:38.452 ***🔗
REST request:
Code: 204
Req: {<0.84165.0>,
<<"/api/contacts/alice_add_contact_and_invite_3023@localhost">>,
<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"a6053a271415f669">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzAyM0Bsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<"{\"action\":\"invite\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 23 Apr 2024 23:35:38 GMT">>}],
<<>>,80,5966}
Params: #{path =>
<<"/api/contacts/alice_add_contact_and_invite_3023@localhost">>,
server => #{node => mongooseim@localhost},
body => <<"{\"action\":\"invite\"}">>,role => client,
method => <<"PUT">>,
creds =>
{<<"bob_add_contact_and_invite_3023@localhost">>,
<<"makrolika">>},
return_headers => true}
*** User 2024-04-23 23:35:38.452 ***🔗
bob_add_contact_and_invite_3023@localhost/res1 in
<iq from='bob_add_contact_and_invite_3023@localhost' to='bob_add_contact_and_invite_3023@localhost/res1' id='pushda0409b815203c4b' type='set'>
<query xmlns='jabber:iq:roster'>
<item ask='subscribe' jid='alice_add_contact_and_invite_3023@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-23 23:35:38.452 ***🔗
Push2: {xmlel,<<"iq">>,
[{<<"from">>,<<"bob_add_contact_and_invite_3023@localhost">>},
{<<"to">>,<<"bob_add_contact_and_invite_3023@localhost/res1">>},
{<<"id">>,<<"pushda0409b815203c4b">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:roster">>}],
[{xmlel,<<"item">>,
[{<<"ask">>,<<"subscribe">>},
{<<"jid">>,
<<"alice_add_contact_and_invite_3023@localhost">>},
{<<"subscription">>,<<"none">>}],
[]}]}]}
*** User 2024-04-23 23:35:38.452 ***🔗
alice_add_contact_and_invite_3023@localhost/res1 in
<presence from='bob_add_contact_and_invite_3023@localhost' to='alice_add_contact_and_invite_3023@localhost/res1' type='subscribe'/>
*** User 2024-04-23 23:35:38.467 ***🔗
REST request:
Code: 200
Req: {<0.84211.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"23fa9b0d7a36c439">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzAyM0Bsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 23 Apr 2024 23:35:38 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"89">>}],
<<"[{\"ask\":\"out\",\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_invite_3023@localhost\"}]">>,
213,7482}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
body => <<>>,role => client,method => <<"GET">>,
creds =>
{<<"bob_add_contact_and_invite_3023@localhost">>,
<<"makrolika">>},
return_headers => true}
*** User 2024-04-23 23:35:38.467 ***🔗
alice_add_contact_and_invite_3023@localhost/res1 out
<iq type='set' id='23c9b70dff7033292c48b1c8beb0ec0c'>
<query xmlns='jabber:iq:roster'>
<item jid='bob_add_contact_and_invite_3023@localhost' name='Bob'/>
</query>
</iq>
*** User 2024-04-23 23:35:38.470 ***🔗
alice_add_contact_and_invite_3023@localhost/res1 in
<iq from='alice_add_contact_and_invite_3023@localhost' to='alice_add_contact_and_invite_3023@localhost/res1' id='push6a0ef9303e2d94a6' type='set'>
<query xmlns='jabber:iq:roster'>
<item name='Bob' jid='bob_add_contact_and_invite_3023@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-23 23:35:38.470 ***🔗
alice_add_contact_and_invite_3023@localhost/res1 out
<iq to='alice_add_contact_and_invite_3023@localhost' id='push6a0ef9303e2d94a6' type='result'/>
*** User 2024-04-23 23:35:38.470 ***🔗
alice_add_contact_and_invite_3023@localhost/res1 in
<iq from='alice_add_contact_and_invite_3023@localhost' to='alice_add_contact_and_invite_3023@localhost/res1' id='23c9b70dff7033292c48b1c8beb0ec0c' type='result'/>
*** User 2024-04-23 23:35:38.470 ***🔗
alice_add_contact_and_invite_3023@localhost/res1 out
<presence type='subscribed' to='bob_add_contact_and_invite_3023@localhost'/>
*** User 2024-04-23 23:35:38.475 ***🔗
bob_add_contact_and_invite_3023@localhost/res1 in
<iq from='bob_add_contact_and_invite_3023@localhost' to='bob_add_contact_and_invite_3023@localhost/res1' id='pushcef1dd8e6c20a779' type='set'>
<query xmlns='jabber:iq:roster'>
<item jid='alice_add_contact_and_invite_3023@localhost' subscription='to'/>
</query>
</iq>
*** User 2024-04-23 23:35:38.475 ***🔗
Push3 {xmlel,<<"iq">>,
[{<<"from">>,<<"bob_add_contact_and_invite_3023@localhost">>},
{<<"to">>,<<"bob_add_contact_and_invite_3023@localhost/res1">>},
{<<"id">>,<<"pushcef1dd8e6c20a779">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:roster">>}],
[{xmlel,<<"item">>,
[{<<"jid">>,
<<"alice_add_contact_and_invite_3023@localhost">>},
{<<"subscription">>,<<"to">>}],
[]}]}]}
*** User 2024-04-23 23:35:38.528 ***🔗
REST request:
Code: 200
Req: {<0.84258.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"c7e4f7379fb25885">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzAyM0Bsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 23 Apr 2024 23:35:38 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"88">>}],
<<"[{\"ask\":\"none\",\"subscription\":\"to\",\"jid\":\"alice_add_contact_and_invite_3023@localhost\"}]">>,
212,47039}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
body => <<>>,role => client,method => <<"GET">>,
creds =>
{<<"bob_add_contact_and_invite_3023@localhost">>,
<<"makrolika">>},
return_headers => true}
*** User 2024-04-23 23:35:38.528 ***🔗
bob_add_contact_and_invite_3023@localhost/res1 out
</stream:stream>
*** User 2024-04-23 23:35:38.529 ***🔗
bob_add_contact_and_invite_3023@localhost/res1 in
</stream:stream>
*** User 2024-04-23 23:35:38.529 ***🔗
alice_add_contact_and_invite_3023@localhost/res1 out
</stream:stream>
*** User 2024-04-23 23:35:38.529 ***🔗
alice_add_contact_and_invite_3023@localhost/res1 in
</stream:stream>
=== Ended at 2024-04-23 23:35:38
=== successfully completed test case
=== === Returned value: ok