=== Test case: rest_client_SUITE:add_contact_and_invite/1 (click for source code)
=== Config value:
[{watchdog,<0.56396.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@9d1ddff7d112.2024-04-16_10.55.26/big_tests.tests.rest_client_SUITE.logs/run.2024-04-16_11.10.21/rest_client_suite.add_contact_and_invite.88067.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@9d1ddff7d112.2024-04-16_10.55.26/big_tests.tests.rest_client_SUITE.logs/run.2024-04-16_11.10.21/log_private/"},
{{saved_modules,mongooseim@localhost,<<"localhost">>},
#{mod_vcard =>
#{matches => 30,
host => {prefix,<<"vjud.">>},
search => true,backend => mnesia,iqdisc => parallel},
mod_roster =>
#{backend => mnesia,iqdisc => one_queue,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 =>
#{users_can_see_hidden_services => false,iqdisc => one_queue,
server_info => [],extra_domains => []},
mod_stream_management =>
#{buffer => true,ack => true,backend => mnesia,
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 => 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@9d1ddff7d112.2024-04-16_10.55.26"
=== Started at 2024-04-16 11:10:22
*** User 2024-04-16 11:10:22.678 ***🔗
alicE_add_contact_and_invite_1902@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-16 11:10:22.679 ***🔗
alicE_add_contact_and_invite_1902@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='2a02fa58523ee52f' from='localhost' version='1.0' xml:lang='en'>
*** User 2024-04-16 11:10:22.679 ***🔗
alicE_add_contact_and_invite_1902@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-16 11:10:22.679 ***🔗
alicE_add_contact_and_invite_1902@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMTkwMgBtYXR5Z3J5c2E=</auth>
*** User 2024-04-16 11:10:22.679 ***🔗
alicE_add_contact_and_invite_1902@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2024-04-16 11:10:22.679 ***🔗
alicE_add_contact_and_invite_1902@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-16 11:10:22.680 ***🔗
alicE_add_contact_and_invite_1902@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='a553cd62a7a0c7f0' from='localhost' version='1.0' xml:lang='en' to='alice_add_contact_and_invite_1902@localhost'>
*** User 2024-04-16 11:10:22.680 ***🔗
alicE_add_contact_and_invite_1902@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-16 11:10:22.680 ***🔗
alicE_add_contact_and_invite_1902@localhost/res1 out
<iq type='set' id='f0ae3b3bca72ce86dc36675de4d64aeb'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2024-04-16 11:10:22.680 ***🔗
alicE_add_contact_and_invite_1902@localhost/res1 in
<iq id='f0ae3b3bca72ce86dc36675de4d64aeb' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alice_add_contact_and_invite_1902@localhost/res1</jid>
</bind>
</iq>
*** User 2024-04-16 11:10:22.680 ***🔗
alice_add_contact_and_invite_1902@localhost/res1 out
<iq type='set' id='93fce9f01e7257eb71902deb3387d3d6'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-16 11:10:22.680 ***🔗
alice_add_contact_and_invite_1902@localhost/res1 in
<iq from='localhost' to='alice_add_contact_and_invite_1902@localhost/res1' id='93fce9f01e7257eb71902deb3387d3d6' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-16 11:10:22.681 ***🔗
alice_add_contact_and_invite_1902@localhost/res1 out
<presence/>
*** User 2024-04-16 11:10:22.681 ***🔗
alice_add_contact_and_invite_1902@localhost/res1 in
<presence from='alice_add_contact_and_invite_1902@localhost/res1' to='alice_add_contact_and_invite_1902@localhost/res1'/>
*** User 2024-04-16 11:10:22.681 ***🔗
bOb_add_contact_and_invite_1902@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-16 11:10:22.682 ***🔗
bOb_add_contact_and_invite_1902@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9051bc3c7dccfe61' from='localhost' version='1.0' xml:lang='en'>
*** User 2024-04-16 11:10:22.682 ***🔗
bOb_add_contact_and_invite_1902@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-16 11:10:22.682 ***🔗
bOb_add_contact_and_invite_1902@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9hZGRfY29udGFjdF9hbmRfaW52aXRlXzE5MDIAbWFrcm9saWth</auth>
*** User 2024-04-16 11:10:22.682 ***🔗
bOb_add_contact_and_invite_1902@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2024-04-16 11:10:22.682 ***🔗
bOb_add_contact_and_invite_1902@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-16 11:10:22.682 ***🔗
bOb_add_contact_and_invite_1902@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b48fda1dbcd23021' from='localhost' version='1.0' xml:lang='en' to='bob_add_contact_and_invite_1902@localhost'>
*** User 2024-04-16 11:10:22.682 ***🔗
bOb_add_contact_and_invite_1902@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-16 11:10:22.683 ***🔗
bOb_add_contact_and_invite_1902@localhost/res1 out
<iq type='set' id='79289cf76c8dda6da63a2661b3865f58'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2024-04-16 11:10:22.683 ***🔗
bOb_add_contact_and_invite_1902@localhost/res1 in
<iq id='79289cf76c8dda6da63a2661b3865f58' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bob_add_contact_and_invite_1902@localhost/res1</jid>
</bind>
</iq>
*** User 2024-04-16 11:10:22.683 ***🔗
bob_add_contact_and_invite_1902@localhost/res1 out
<iq type='set' id='2dc315d5b7a1cd04ad9fb0166e4f7fc9'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-16 11:10:22.683 ***🔗
bob_add_contact_and_invite_1902@localhost/res1 in
<iq from='localhost' to='bob_add_contact_and_invite_1902@localhost/res1' id='2dc315d5b7a1cd04ad9fb0166e4f7fc9' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-16 11:10:22.683 ***🔗
bob_add_contact_and_invite_1902@localhost/res1 out
<presence/>
*** User 2024-04-16 11:10:22.684 ***🔗
bob_add_contact_and_invite_1902@localhost/res1 in
<presence from='bob_add_contact_and_invite_1902@localhost/res1' to='bob_add_contact_and_invite_1902@localhost/res1'/>
*** User 2024-04-16 11:10:22.689 ***🔗
REST request:
Code: 200
Req: {<0.56465.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"10327f38bd251cf2">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMTkwMkBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 16 Apr 2024 11:10:21 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"2">>}],
<<"[]">>,125,550}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
role => client,
creds =>
{<<"bob_add_contact_and_invite_1902@localhost">>,
<<"makrolika">>},
method => <<"GET">>,body => <<>>,return_headers => true}
*** User 2024-04-16 11:10:22.696 ***🔗
REST request:
Code: 204
Req: {<0.56491.0>,<<"/api/contacts">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"b99584df6ff06850">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMTkwMkBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<"{\"jid\":\"alice_add_contact_and_invite_1902@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 16 Apr 2024 11:10:21 GMT">>}],
<<>>,80,1074}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
role => client,
creds =>
{<<"bob_add_contact_and_invite_1902@localhost">>,
<<"makrolika">>},
method => <<"POST">>,
body =>
<<"{\"jid\":\"alice_add_contact_and_invite_1902@localhost\"}">>,
return_headers => true}
*** User 2024-04-16 11:10:22.696 ***🔗
bob_add_contact_and_invite_1902@localhost/res1 in
<iq from='bob_add_contact_and_invite_1902@localhost' to='bob_add_contact_and_invite_1902@localhost/res1' id='pushbd11b4651bee1366' type='set'>
<query xmlns='jabber:iq:roster'>
<item jid='alice_add_contact_and_invite_1902@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-16 11:10:22.702 ***🔗
REST request:
Code: 200
Req: {<0.56523.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"c1875fed0fadbdd6">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMTkwMkBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 16 Apr 2024 11:10:21 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"90">>}],
<<"[{\"ask\":\"none\",\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_invite_1902@localhost\"}]">>,
214,868}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
role => client,
creds =>
{<<"bob_add_contact_and_invite_1902@localhost">>,
<<"makrolika">>},
method => <<"GET">>,body => <<>>,return_headers => true}
*** User 2024-04-16 11:10:22.708 ***🔗
REST request:
Code: 204
Req: {<0.56555.0>,
<<"/api/contacts/alice_add_contact_and_invite_1902@localhost">>,
<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"56dcfa79dd26b89a">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMTkwMkBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<"{\"action\":\"invite\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 16 Apr 2024 11:10:21 GMT">>}],
<<>>,80,1247}
Params: #{path =>
<<"/api/contacts/alice_add_contact_and_invite_1902@localhost">>,
server => #{node => mongooseim@localhost},
role => client,
creds =>
{<<"bob_add_contact_and_invite_1902@localhost">>,
<<"makrolika">>},
method => <<"PUT">>,body => <<"{\"action\":\"invite\"}">>,
return_headers => true}
*** User 2024-04-16 11:10:22.708 ***🔗
bob_add_contact_and_invite_1902@localhost/res1 in
<iq from='bob_add_contact_and_invite_1902@localhost' to='bob_add_contact_and_invite_1902@localhost/res1' id='pushffb1dedd86403cae' type='set'>
<query xmlns='jabber:iq:roster'>
<item ask='subscribe' jid='alice_add_contact_and_invite_1902@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-16 11:10:22.708 ***🔗
Push2: {xmlel,<<"iq">>,
[{<<"from">>,<<"bob_add_contact_and_invite_1902@localhost">>},
{<<"to">>,<<"bob_add_contact_and_invite_1902@localhost/res1">>},
{<<"id">>,<<"pushffb1dedd86403cae">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:roster">>}],
[{xmlel,<<"item">>,
[{<<"ask">>,<<"subscribe">>},
{<<"jid">>,
<<"alice_add_contact_and_invite_1902@localhost">>},
{<<"subscription">>,<<"none">>}],
[]}]}]}
*** User 2024-04-16 11:10:22.708 ***🔗
alice_add_contact_and_invite_1902@localhost/res1 in
<presence from='bob_add_contact_and_invite_1902@localhost' to='alice_add_contact_and_invite_1902@localhost/res1' type='subscribe'/>
*** User 2024-04-16 11:10:22.714 ***🔗
REST request:
Code: 200
Req: {<0.56595.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"caf57852739cdd30">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMTkwMkBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 16 Apr 2024 11:10:21 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"89">>}],
<<"[{\"ask\":\"out\",\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_invite_1902@localhost\"}]">>,
213,646}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
role => client,
creds =>
{<<"bob_add_contact_and_invite_1902@localhost">>,
<<"makrolika">>},
method => <<"GET">>,body => <<>>,return_headers => true}
*** User 2024-04-16 11:10:22.714 ***🔗
alice_add_contact_and_invite_1902@localhost/res1 out
<iq type='set' id='45dcc62a37956de789c77ba3f5b0c0f3'>
<query xmlns='jabber:iq:roster'>
<item jid='bob_add_contact_and_invite_1902@localhost' name='Bob'/>
</query>
</iq>
*** User 2024-04-16 11:10:22.715 ***🔗
alice_add_contact_and_invite_1902@localhost/res1 in
<iq from='alice_add_contact_and_invite_1902@localhost' to='alice_add_contact_and_invite_1902@localhost/res1' id='pushf325b3a329fa67fd' type='set'>
<query xmlns='jabber:iq:roster'>
<item name='Bob' jid='bob_add_contact_and_invite_1902@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-16 11:10:22.715 ***🔗
alice_add_contact_and_invite_1902@localhost/res1 out
<iq to='alice_add_contact_and_invite_1902@localhost' id='pushf325b3a329fa67fd' type='result'/>
*** User 2024-04-16 11:10:22.715 ***🔗
alice_add_contact_and_invite_1902@localhost/res1 in
<iq from='alice_add_contact_and_invite_1902@localhost' to='alice_add_contact_and_invite_1902@localhost/res1' id='45dcc62a37956de789c77ba3f5b0c0f3' type='result'/>
*** User 2024-04-16 11:10:22.715 ***🔗
alice_add_contact_and_invite_1902@localhost/res1 out
<presence type='subscribed' to='bob_add_contact_and_invite_1902@localhost'/>
*** User 2024-04-16 11:10:22.717 ***🔗
bob_add_contact_and_invite_1902@localhost/res1 in
<iq from='bob_add_contact_and_invite_1902@localhost' to='bob_add_contact_and_invite_1902@localhost/res1' id='push405a5cedc162a114' type='set'>
<query xmlns='jabber:iq:roster'>
<item jid='alice_add_contact_and_invite_1902@localhost' subscription='to'/>
</query>
</iq>
*** User 2024-04-16 11:10:22.717 ***🔗
Push3 {xmlel,<<"iq">>,
[{<<"from">>,<<"bob_add_contact_and_invite_1902@localhost">>},
{<<"to">>,<<"bob_add_contact_and_invite_1902@localhost/res1">>},
{<<"id">>,<<"push405a5cedc162a114">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:roster">>}],
[{xmlel,<<"item">>,
[{<<"jid">>,
<<"alice_add_contact_and_invite_1902@localhost">>},
{<<"subscription">>,<<"to">>}],
[]}]}]}
*** User 2024-04-16 11:10:22.722 ***🔗
REST request:
Code: 200
Req: {<0.56632.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"b43d2053e9f4af30">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMTkwMkBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Tue, 16 Apr 2024 11:10:21 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"88">>}],
<<"[{\"ask\":\"none\",\"subscription\":\"to\",\"jid\":\"alice_add_contact_and_invite_1902@localhost\"}]">>,
212,966}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
role => client,
creds =>
{<<"bob_add_contact_and_invite_1902@localhost">>,
<<"makrolika">>},
method => <<"GET">>,body => <<>>,return_headers => true}
*** User 2024-04-16 11:10:22.723 ***🔗
bob_add_contact_and_invite_1902@localhost/res1 out
</stream:stream>
*** User 2024-04-16 11:10:22.723 ***🔗
bob_add_contact_and_invite_1902@localhost/res1 in
</stream:stream>
*** User 2024-04-16 11:10:22.723 ***🔗
alice_add_contact_and_invite_1902@localhost/res1 out
</stream:stream>
*** User 2024-04-16 11:10:22.723 ***🔗
alice_add_contact_and_invite_1902@localhost/res1 in
</stream:stream>
=== Ended at 2024-04-16 11:10:22
=== successfully completed test case
=== === Returned value: ok