=== Test case: rest_client_SUITE:add_contact_and_invite/1 (click for source code)
=== Config value:
[{watchdog,<0.56425.0>},
{muc_light_host,<<"muclight.localhost">>},
{mam_backend,disabled},
{preset,"internal_mnesia"},
{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@8f270c211212.2024-04-22_14.32.33/big_tests.tests.rest_client_SUITE.logs/run.2024-04-22_14.47.00/rest_client_suite.add_contact_and_invite.77571.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@8f270c211212.2024-04-22_14.32.33/big_tests.tests.rest_client_SUITE.logs/run.2024-04-22_14.47.00/log_private/"},
{{saved_modules,mongooseim@localhost,<<"localhost">>},
#{mod_vcard =>
#{matches => 30,
host => {prefix,<<"vjud.">>},
search => true,iqdisc => parallel,backend => mnesia},
mod_roster =>
#{iqdisc => one_queue,backend => mnesia,versioning => false,
store_current_id => false},
mod_amp => #{},
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_presence => #{},
mod_disco =>
#{iqdisc => one_queue,server_info => [],extra_domains => [],
users_can_see_hidden_services => false},
mod_stream_management =>
#{buffer => true,ack => true,backend => mnesia,buffer_max => 100,
stale_h =>
#{enabled => false,repeat_after => 1800,geriatric => 3600},
ack_freq => 1,resume_timeout => 600},
mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
mod_bosh =>
#{backend => mnesia,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@8f270c211212.2024-04-22_14.32.33"
=== Started at 2024-04-22 14:47:02
*** User 2024-04-22 14:47:02.120 ***🔗
alicE_add_contact_and_invite_1871@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-22 14:47:02.121 ***🔗
alicE_add_contact_and_invite_1871@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9b94483894b9ee0e' from='localhost' version='1.0' xml:lang='en'>
*** User 2024-04-22 14:47:02.121 ***🔗
alicE_add_contact_and_invite_1871@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-22 14:47:02.121 ***🔗
alicE_add_contact_and_invite_1871@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMTg3MQBtYXR5Z3J5c2E=</auth>
*** User 2024-04-22 14:47:02.121 ***🔗
alicE_add_contact_and_invite_1871@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2024-04-22 14:47:02.121 ***🔗
alicE_add_contact_and_invite_1871@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-22 14:47:02.122 ***🔗
alicE_add_contact_and_invite_1871@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='a82a86306be2ed65' from='localhost' version='1.0' xml:lang='en' to='alice_add_contact_and_invite_1871@localhost'>
*** User 2024-04-22 14:47:02.122 ***🔗
alicE_add_contact_and_invite_1871@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-22 14:47:02.122 ***🔗
alicE_add_contact_and_invite_1871@localhost/res1 out
<iq type='set' id='f06f28e6e517dc2960659836f82b8438'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2024-04-22 14:47:02.122 ***🔗
alicE_add_contact_and_invite_1871@localhost/res1 in
<iq id='f06f28e6e517dc2960659836f82b8438' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alice_add_contact_and_invite_1871@localhost/res1</jid>
</bind>
</iq>
*** User 2024-04-22 14:47:02.122 ***🔗
alice_add_contact_and_invite_1871@localhost/res1 out
<iq type='set' id='b3d06783dd141f06f736485227aa393e'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-22 14:47:02.123 ***🔗
alice_add_contact_and_invite_1871@localhost/res1 in
<iq from='localhost' to='alice_add_contact_and_invite_1871@localhost/res1' id='b3d06783dd141f06f736485227aa393e' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-22 14:47:02.123 ***🔗
alice_add_contact_and_invite_1871@localhost/res1 out
<presence/>
*** User 2024-04-22 14:47:02.124 ***🔗
alice_add_contact_and_invite_1871@localhost/res1 in
<presence from='alice_add_contact_and_invite_1871@localhost/res1' to='alice_add_contact_and_invite_1871@localhost/res1'/>
*** User 2024-04-22 14:47:02.124 ***🔗
bOb_add_contact_and_invite_1871@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-22 14:47:02.124 ***🔗
bOb_add_contact_and_invite_1871@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d1987e2e2cb4f4c8' from='localhost' version='1.0' xml:lang='en'>
*** User 2024-04-22 14:47:02.125 ***🔗
bOb_add_contact_and_invite_1871@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-22 14:47:02.125 ***🔗
bOb_add_contact_and_invite_1871@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9hZGRfY29udGFjdF9hbmRfaW52aXRlXzE4NzEAbWFrcm9saWth</auth>
*** User 2024-04-22 14:47:02.125 ***🔗
bOb_add_contact_and_invite_1871@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2024-04-22 14:47:02.125 ***🔗
bOb_add_contact_and_invite_1871@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-22 14:47:02.126 ***🔗
bOb_add_contact_and_invite_1871@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='ae7e2894e3046b32' from='localhost' version='1.0' xml:lang='en' to='bob_add_contact_and_invite_1871@localhost'>
*** User 2024-04-22 14:47:02.126 ***🔗
bOb_add_contact_and_invite_1871@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-22 14:47:02.126 ***🔗
bOb_add_contact_and_invite_1871@localhost/res1 out
<iq type='set' id='b7cc7040f50eea9430471afb45aaf669'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2024-04-22 14:47:02.126 ***🔗
bOb_add_contact_and_invite_1871@localhost/res1 in
<iq id='b7cc7040f50eea9430471afb45aaf669' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bob_add_contact_and_invite_1871@localhost/res1</jid>
</bind>
</iq>
*** User 2024-04-22 14:47:02.126 ***🔗
bob_add_contact_and_invite_1871@localhost/res1 out
<iq type='set' id='6916ca49e7fdc6e33f2901caccd476af'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-22 14:47:02.127 ***🔗
bob_add_contact_and_invite_1871@localhost/res1 in
<iq from='localhost' to='bob_add_contact_and_invite_1871@localhost/res1' id='6916ca49e7fdc6e33f2901caccd476af' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-22 14:47:02.127 ***🔗
bob_add_contact_and_invite_1871@localhost/res1 out
<presence/>
*** User 2024-04-22 14:47:02.127 ***🔗
bob_add_contact_and_invite_1871@localhost/res1 in
<presence from='bob_add_contact_and_invite_1871@localhost/res1' to='bob_add_contact_and_invite_1871@localhost/res1'/>
*** User 2024-04-22 14:47:02.134 ***🔗
REST request:
Code: 200
Req: {<0.56492.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"b36de9d2e73e8545">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMTg3MUBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Mon, 22 Apr 2024 14:47:01 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"2">>}],
<<"[]">>,125,997}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
role => client,method => <<"GET">>,body => <<>>,
creds =>
{<<"bob_add_contact_and_invite_1871@localhost">>,
<<"makrolika">>},
return_headers => true}
*** User 2024-04-22 14:47:02.142 ***🔗
REST request:
Code: 204
Req: {<0.56519.0>,<<"/api/contacts">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"a1314de8a0327adb">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMTg3MUBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<"{\"jid\":\"alice_add_contact_and_invite_1871@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Mon, 22 Apr 2024 14:47:01 GMT">>}],
<<>>,80,1402}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
role => client,method => <<"POST">>,
body =>
<<"{\"jid\":\"alice_add_contact_and_invite_1871@localhost\"}">>,
creds =>
{<<"bob_add_contact_and_invite_1871@localhost">>,
<<"makrolika">>},
return_headers => true}
*** User 2024-04-22 14:47:02.142 ***🔗
bob_add_contact_and_invite_1871@localhost/res1 in
<iq from='bob_add_contact_and_invite_1871@localhost' to='bob_add_contact_and_invite_1871@localhost/res1' id='pushb22ee14577ac977c' type='set'>
<query xmlns='jabber:iq:roster'>
<item jid='alice_add_contact_and_invite_1871@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-22 14:47:02.149 ***🔗
REST request:
Code: 200
Req: {<0.56556.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"e0112e107ff224fe">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMTg3MUBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Mon, 22 Apr 2024 14:47:01 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"90">>}],
<<"[{\"ask\":\"none\",\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_invite_1871@localhost\"}]">>,
214,798}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
role => client,method => <<"GET">>,body => <<>>,
creds =>
{<<"bob_add_contact_and_invite_1871@localhost">>,
<<"makrolika">>},
return_headers => true}
*** User 2024-04-22 14:47:02.158 ***🔗
REST request:
Code: 204
Req: {<0.56580.0>,
<<"/api/contacts/alice_add_contact_and_invite_1871@localhost">>,
<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"a284b4a63dcbdf5e">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMTg3MUBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<"{\"action\":\"invite\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Mon, 22 Apr 2024 14:47:01 GMT">>}],
<<>>,80,2038}
Params: #{path =>
<<"/api/contacts/alice_add_contact_and_invite_1871@localhost">>,
server => #{node => mongooseim@localhost},
role => client,method => <<"PUT">>,
body => <<"{\"action\":\"invite\"}">>,
creds =>
{<<"bob_add_contact_and_invite_1871@localhost">>,
<<"makrolika">>},
return_headers => true}
*** User 2024-04-22 14:47:02.158 ***🔗
bob_add_contact_and_invite_1871@localhost/res1 in
<iq from='bob_add_contact_and_invite_1871@localhost' to='bob_add_contact_and_invite_1871@localhost/res1' id='push1abc66155a6fa7dc' type='set'>
<query xmlns='jabber:iq:roster'>
<item ask='subscribe' jid='alice_add_contact_and_invite_1871@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-22 14:47:02.158 ***🔗
Push2: {xmlel,<<"iq">>,
[{<<"from">>,<<"bob_add_contact_and_invite_1871@localhost">>},
{<<"to">>,<<"bob_add_contact_and_invite_1871@localhost/res1">>},
{<<"id">>,<<"push1abc66155a6fa7dc">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:roster">>}],
[{xmlel,<<"item">>,
[{<<"ask">>,<<"subscribe">>},
{<<"jid">>,
<<"alice_add_contact_and_invite_1871@localhost">>},
{<<"subscription">>,<<"none">>}],
[]}]}]}
*** User 2024-04-22 14:47:02.158 ***🔗
alice_add_contact_and_invite_1871@localhost/res1 in
<presence from='bob_add_contact_and_invite_1871@localhost' to='alice_add_contact_and_invite_1871@localhost/res1' type='subscribe'/>
*** User 2024-04-22 14:47:02.193 ***🔗
REST request:
Code: 200
Req: {<0.56610.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"55c3f0444211d8cb">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMTg3MUBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Mon, 22 Apr 2024 14:47:01 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"89">>}],
<<"[{\"ask\":\"out\",\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_invite_1871@localhost\"}]">>,
213,817}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
role => client,method => <<"GET">>,body => <<>>,
creds =>
{<<"bob_add_contact_and_invite_1871@localhost">>,
<<"makrolika">>},
return_headers => true}
*** User 2024-04-22 14:47:02.193 ***🔗
alice_add_contact_and_invite_1871@localhost/res1 out
<iq type='set' id='2f73fe558854e15d001d8dbb9bd9d488'>
<query xmlns='jabber:iq:roster'>
<item jid='bob_add_contact_and_invite_1871@localhost' name='Bob'/>
</query>
</iq>
*** User 2024-04-22 14:47:02.194 ***🔗
alice_add_contact_and_invite_1871@localhost/res1 in
<iq from='alice_add_contact_and_invite_1871@localhost' to='alice_add_contact_and_invite_1871@localhost/res1' id='pusha92a98dbe4c9af12' type='set'>
<query xmlns='jabber:iq:roster'>
<item name='Bob' jid='bob_add_contact_and_invite_1871@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-22 14:47:02.194 ***🔗
alice_add_contact_and_invite_1871@localhost/res1 out
<iq to='alice_add_contact_and_invite_1871@localhost' id='pusha92a98dbe4c9af12' type='result'/>
*** User 2024-04-22 14:47:02.194 ***🔗
alice_add_contact_and_invite_1871@localhost/res1 in
<iq from='alice_add_contact_and_invite_1871@localhost' to='alice_add_contact_and_invite_1871@localhost/res1' id='2f73fe558854e15d001d8dbb9bd9d488' type='result'/>
*** User 2024-04-22 14:47:02.194 ***🔗
alice_add_contact_and_invite_1871@localhost/res1 out
<presence type='subscribed' to='bob_add_contact_and_invite_1871@localhost'/>
*** User 2024-04-22 14:47:02.196 ***🔗
bob_add_contact_and_invite_1871@localhost/res1 in
<iq from='bob_add_contact_and_invite_1871@localhost' to='bob_add_contact_and_invite_1871@localhost/res1' id='push90bbb21b2834735b' type='set'>
<query xmlns='jabber:iq:roster'>
<item jid='alice_add_contact_and_invite_1871@localhost' subscription='to'/>
</query>
</iq>
*** User 2024-04-22 14:47:02.196 ***🔗
Push3 {xmlel,<<"iq">>,
[{<<"from">>,<<"bob_add_contact_and_invite_1871@localhost">>},
{<<"to">>,<<"bob_add_contact_and_invite_1871@localhost/res1">>},
{<<"id">>,<<"push90bbb21b2834735b">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:roster">>}],
[{xmlel,<<"item">>,
[{<<"jid">>,
<<"alice_add_contact_and_invite_1871@localhost">>},
{<<"subscription">>,<<"to">>}],
[]}]}]}
*** User 2024-04-22 14:47:02.202 ***🔗
REST request:
Code: 200
Req: {<0.56663.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"a506a2a3f5c51d6d">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMTg3MUBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Mon, 22 Apr 2024 14:47:01 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"88">>}],
<<"[{\"ask\":\"none\",\"subscription\":\"to\",\"jid\":\"alice_add_contact_and_invite_1871@localhost\"}]">>,
212,699}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
role => client,method => <<"GET">>,body => <<>>,
creds =>
{<<"bob_add_contact_and_invite_1871@localhost">>,
<<"makrolika">>},
return_headers => true}
*** User 2024-04-22 14:47:02.203 ***🔗
bob_add_contact_and_invite_1871@localhost/res1 out
</stream:stream>
*** User 2024-04-22 14:47:02.203 ***🔗
bob_add_contact_and_invite_1871@localhost/res1 in
</stream:stream>
*** User 2024-04-22 14:47:02.203 ***🔗
alice_add_contact_and_invite_1871@localhost/res1 out
</stream:stream>
*** User 2024-04-22 14:47:02.204 ***🔗
alice_add_contact_and_invite_1871@localhost/res1 in
</stream:stream>
=== Ended at 2024-04-22 14:47:02
=== successfully completed test case
=== === Returned value: ok