=== Test case: rest_client_SUITE:add_contact_and_invite/1 (click for source code)
=== Config value:
[{watchdog,<0.89337.0>},
{muc_light_host,<<"muclight.localhost">>},
{mam_backend,rdbms},
{preset,"mysql_redis"},
{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@70badadd0f1a.2024-04-10_12.44.57/big_tests.tests.rest_client_SUITE.logs/run.2024-04-10_12.59.47/rest_client_suite.add_contact_and_invite.243586.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@70badadd0f1a.2024-04-10_12.44.57/big_tests.tests.rest_client_SUITE.logs/run.2024-04-10_12.59.47/log_private/"},
{{saved_modules,mongooseim@localhost,<<"localhost">>},
#{mod_vcard =>
#{matches => 30,
host => {prefix,<<"vjud.">>},
search => true,iqdisc => parallel,backend => rdbms},
mod_roster =>
#{iqdisc => one_queue,backend => rdbms,versioning => false,
store_current_id => false},
mod_sic => #{iqdisc => one_queue},
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_presence => #{},
mod_disco =>
#{iqdisc => one_queue,users_can_see_hidden_services => false,
server_info => [],extra_domains => []},
mod_stream_management =>
#{buffer => true,ack => true,
stale_h =>
#{enabled => false,repeat_after => 1800,geriatric => 3600},
backend => mnesia,buffer_max => 100,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@70badadd0f1a.2024-04-10_12.44.57"
=== Started at 2024-04-10 12:59:49
*** User 2024-04-10 12:59:49.302 ***🔗
alicE_add_contact_and_invite_3200@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-10 12:59:49.302 ***🔗
alicE_add_contact_and_invite_3200@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3f05abcad372e9f3' from='localhost' version='1.0' xml:lang='en'>
*** User 2024-04-10 12:59:49.302 ***🔗
alicE_add_contact_and_invite_3200@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-10 12:59:49.303 ***🔗
alicE_add_contact_and_invite_3200@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzIwMABtYXR5Z3J5c2E=</auth>
*** User 2024-04-10 12:59:49.303 ***🔗
alicE_add_contact_and_invite_3200@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2024-04-10 12:59:49.304 ***🔗
alicE_add_contact_and_invite_3200@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-10 12:59:49.304 ***🔗
alicE_add_contact_and_invite_3200@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4e6e7b14ee1d348b' from='localhost' version='1.0' xml:lang='en' to='alice_add_contact_and_invite_3200@localhost'>
*** User 2024-04-10 12:59:49.304 ***🔗
alicE_add_contact_and_invite_3200@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-10 12:59:49.304 ***🔗
alicE_add_contact_and_invite_3200@localhost/res1 out
<iq type='set' id='2c2c9a8eac3e462b7518bf2a35a73e1b'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2024-04-10 12:59:49.304 ***🔗
alicE_add_contact_and_invite_3200@localhost/res1 in
<iq id='2c2c9a8eac3e462b7518bf2a35a73e1b' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alice_add_contact_and_invite_3200@localhost/res1</jid>
</bind>
</iq>
*** User 2024-04-10 12:59:49.304 ***🔗
alice_add_contact_and_invite_3200@localhost/res1 out
<iq type='set' id='853762f33204fb9e604d9862ffbc8290'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-10 12:59:49.305 ***🔗
alice_add_contact_and_invite_3200@localhost/res1 in
<iq from='localhost' to='alice_add_contact_and_invite_3200@localhost/res1' id='853762f33204fb9e604d9862ffbc8290' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-10 12:59:49.305 ***🔗
alice_add_contact_and_invite_3200@localhost/res1 out
<presence/>
*** User 2024-04-10 12:59:49.307 ***🔗
alice_add_contact_and_invite_3200@localhost/res1 in
<presence from='alice_add_contact_and_invite_3200@localhost/res1' to='alice_add_contact_and_invite_3200@localhost/res1'/>
*** User 2024-04-10 12:59:49.308 ***🔗
bOb_add_contact_and_invite_3200@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-10 12:59:49.308 ***🔗
bOb_add_contact_and_invite_3200@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='bfe6a640652faac1' from='localhost' version='1.0' xml:lang='en'>
*** User 2024-04-10 12:59:49.308 ***🔗
bOb_add_contact_and_invite_3200@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-10 12:59:49.308 ***🔗
bOb_add_contact_and_invite_3200@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9hZGRfY29udGFjdF9hbmRfaW52aXRlXzMyMDAAbWFrcm9saWth</auth>
*** User 2024-04-10 12:59:49.309 ***🔗
bOb_add_contact_and_invite_3200@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2024-04-10 12:59:49.309 ***🔗
bOb_add_contact_and_invite_3200@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-10 12:59:49.309 ***🔗
bOb_add_contact_and_invite_3200@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c8450bc601a15041' from='localhost' version='1.0' xml:lang='en' to='bob_add_contact_and_invite_3200@localhost'>
*** User 2024-04-10 12:59:49.309 ***🔗
bOb_add_contact_and_invite_3200@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-10 12:59:49.309 ***🔗
bOb_add_contact_and_invite_3200@localhost/res1 out
<iq type='set' id='f20f237a6b65640abc4800856826d621'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2024-04-10 12:59:49.309 ***🔗
bOb_add_contact_and_invite_3200@localhost/res1 in
<iq id='f20f237a6b65640abc4800856826d621' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bob_add_contact_and_invite_3200@localhost/res1</jid>
</bind>
</iq>
*** User 2024-04-10 12:59:49.310 ***🔗
bob_add_contact_and_invite_3200@localhost/res1 out
<iq type='set' id='320902afff56db97884f6863d6018d9c'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-10 12:59:49.310 ***🔗
bob_add_contact_and_invite_3200@localhost/res1 in
<iq from='localhost' to='bob_add_contact_and_invite_3200@localhost/res1' id='320902afff56db97884f6863d6018d9c' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-10 12:59:49.310 ***🔗
bob_add_contact_and_invite_3200@localhost/res1 out
<presence/>
*** User 2024-04-10 12:59:49.312 ***🔗
bob_add_contact_and_invite_3200@localhost/res1 in
<presence from='bob_add_contact_and_invite_3200@localhost/res1' to='bob_add_contact_and_invite_3200@localhost/res1'/>
*** User 2024-04-10 12:59:49.321 ***🔗
REST request:
Code: 200
Req: {<0.89402.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"e081e13bfd344e68">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzIwMEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 10 Apr 2024 12:59:48 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"2">>}],
<<"[]">>,125,3155}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
creds =>
{<<"bob_add_contact_and_invite_3200@localhost">>,
<<"makrolika">>},
role => client,body => <<>>,method => <<"GET">>,
return_headers => true}
*** User 2024-04-10 12:59:49.330 ***🔗
REST request:
Code: 204
Req: {<0.89436.0>,<<"/api/contacts">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"b404025ed299b07b">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzIwMEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<"{\"jid\":\"alice_add_contact_and_invite_3200@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 10 Apr 2024 12:59:48 GMT">>}],
<<>>,80,4062}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
creds =>
{<<"bob_add_contact_and_invite_3200@localhost">>,
<<"makrolika">>},
role => client,
body =>
<<"{\"jid\":\"alice_add_contact_and_invite_3200@localhost\"}">>,
method => <<"POST">>,return_headers => true}
*** User 2024-04-10 12:59:49.330 ***🔗
bob_add_contact_and_invite_3200@localhost/res1 in
<iq from='bob_add_contact_and_invite_3200@localhost' to='bob_add_contact_and_invite_3200@localhost/res1' id='pusheec61934d552b2ed' type='set'>
<query xmlns='jabber:iq:roster'>
<item jid='alice_add_contact_and_invite_3200@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-10 12:59:49.362 ***🔗
REST request:
Code: 200
Req: {<0.89462.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"6ee4cb8bd6380bb4">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzIwMEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 10 Apr 2024 12:59:48 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"90">>}],
<<"[{\"ask\":\"none\",\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_invite_3200@localhost\"}]">>,
214,3936}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
creds =>
{<<"bob_add_contact_and_invite_3200@localhost">>,
<<"makrolika">>},
role => client,body => <<>>,method => <<"GET">>,
return_headers => true}
*** User 2024-04-10 12:59:49.377 ***🔗
REST request:
Code: 204
Req: {<0.89500.0>,
<<"/api/contacts/alice_add_contact_and_invite_3200@localhost">>,
<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"d736ef0c8a94b0d7">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzIwMEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<"{\"action\":\"invite\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 10 Apr 2024 12:59:48 GMT">>}],
<<>>,80,8523}
Params: #{path =>
<<"/api/contacts/alice_add_contact_and_invite_3200@localhost">>,
server => #{node => mongooseim@localhost},
creds =>
{<<"bob_add_contact_and_invite_3200@localhost">>,
<<"makrolika">>},
role => client,body => <<"{\"action\":\"invite\"}">>,
method => <<"PUT">>,return_headers => true}
*** User 2024-04-10 12:59:49.377 ***🔗
bob_add_contact_and_invite_3200@localhost/res1 in
<iq from='bob_add_contact_and_invite_3200@localhost' to='bob_add_contact_and_invite_3200@localhost/res1' id='push70a3a4c47c2ff556' type='set'>
<query xmlns='jabber:iq:roster'>
<item ask='subscribe' jid='alice_add_contact_and_invite_3200@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-10 12:59:49.377 ***🔗
Push2: {xmlel,<<"iq">>,
[{<<"from">>,<<"bob_add_contact_and_invite_3200@localhost">>},
{<<"to">>,<<"bob_add_contact_and_invite_3200@localhost/res1">>},
{<<"id">>,<<"push70a3a4c47c2ff556">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:roster">>}],
[{xmlel,<<"item">>,
[{<<"ask">>,<<"subscribe">>},
{<<"jid">>,
<<"alice_add_contact_and_invite_3200@localhost">>},
{<<"subscription">>,<<"none">>}],
[]}]}]}
*** User 2024-04-10 12:59:49.378 ***🔗
alice_add_contact_and_invite_3200@localhost/res1 in
<presence from='bob_add_contact_and_invite_3200@localhost' to='alice_add_contact_and_invite_3200@localhost/res1' type='subscribe'/>
*** User 2024-04-10 12:59:49.388 ***🔗
REST request:
Code: 200
Req: {<0.89542.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"219d429c7248d92b">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzIwMEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 10 Apr 2024 12:59:48 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"89">>}],
<<"[{\"ask\":\"out\",\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_invite_3200@localhost\"}]">>,
213,3545}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
creds =>
{<<"bob_add_contact_and_invite_3200@localhost">>,
<<"makrolika">>},
role => client,body => <<>>,method => <<"GET">>,
return_headers => true}
*** User 2024-04-10 12:59:49.388 ***🔗
alice_add_contact_and_invite_3200@localhost/res1 out
<iq type='set' id='767d98ebc81f20c0ec043372f8437c8c'>
<query xmlns='jabber:iq:roster'>
<item jid='bob_add_contact_and_invite_3200@localhost' name='Bob'/>
</query>
</iq>
*** User 2024-04-10 12:59:49.391 ***🔗
alice_add_contact_and_invite_3200@localhost/res1 in
<iq from='alice_add_contact_and_invite_3200@localhost' to='alice_add_contact_and_invite_3200@localhost/res1' id='push71276da670d43084' type='set'>
<query xmlns='jabber:iq:roster'>
<item name='Bob' jid='bob_add_contact_and_invite_3200@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-10 12:59:49.391 ***🔗
alice_add_contact_and_invite_3200@localhost/res1 out
<iq to='alice_add_contact_and_invite_3200@localhost' id='push71276da670d43084' type='result'/>
*** User 2024-04-10 12:59:49.391 ***🔗
alice_add_contact_and_invite_3200@localhost/res1 in
<iq from='alice_add_contact_and_invite_3200@localhost' to='alice_add_contact_and_invite_3200@localhost/res1' id='767d98ebc81f20c0ec043372f8437c8c' type='result'/>
*** User 2024-04-10 12:59:49.391 ***🔗
alice_add_contact_and_invite_3200@localhost/res1 out
<presence type='subscribed' to='bob_add_contact_and_invite_3200@localhost'/>
*** User 2024-04-10 12:59:49.399 ***🔗
bob_add_contact_and_invite_3200@localhost/res1 in
<iq from='bob_add_contact_and_invite_3200@localhost' to='bob_add_contact_and_invite_3200@localhost/res1' id='pushf40697511f0156a0' type='set'>
<query xmlns='jabber:iq:roster'>
<item jid='alice_add_contact_and_invite_3200@localhost' subscription='to'/>
</query>
</iq>
*** User 2024-04-10 12:59:49.399 ***🔗
Push3 {xmlel,<<"iq">>,
[{<<"from">>,<<"bob_add_contact_and_invite_3200@localhost">>},
{<<"to">>,<<"bob_add_contact_and_invite_3200@localhost/res1">>},
{<<"id">>,<<"pushf40697511f0156a0">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:roster">>}],
[{xmlel,<<"item">>,
[{<<"jid">>,
<<"alice_add_contact_and_invite_3200@localhost">>},
{<<"subscription">>,<<"to">>}],
[]}]}]}
*** User 2024-04-10 12:59:49.406 ***🔗
REST request:
Code: 200
Req: {<0.89594.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"dba329a0b2314459">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzIwMEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Wed, 10 Apr 2024 12:59:48 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"88">>}],
<<"[{\"ask\":\"none\",\"subscription\":\"to\",\"jid\":\"alice_add_contact_and_invite_3200@localhost\"}]">>,
212,2809}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
creds =>
{<<"bob_add_contact_and_invite_3200@localhost">>,
<<"makrolika">>},
role => client,body => <<>>,method => <<"GET">>,
return_headers => true}
*** User 2024-04-10 12:59:49.407 ***🔗
bob_add_contact_and_invite_3200@localhost/res1 out
</stream:stream>
*** User 2024-04-10 12:59:49.407 ***🔗
bob_add_contact_and_invite_3200@localhost/res1 in
</stream:stream>
*** User 2024-04-10 12:59:49.407 ***🔗
alice_add_contact_and_invite_3200@localhost/res1 out
</stream:stream>
*** User 2024-04-10 12:59:49.425 ***🔗
alice_add_contact_and_invite_3200@localhost/res1 in
</stream:stream>
=== Ended at 2024-04-10 12:59:49
=== successfully completed test case
=== === Returned value: ok