=== Test case: rest_client_SUITE:add_contact_and_invite/1 (click for source code)
=== Config value:
[{watchdog,<0.89381.0>},
{muc_light_host,<<"muclight.localhost">>},
{mam_backend,rdbms},
{preset,"pgsql_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@26557528e1a5.2024-04-25_12.01.25/big_tests.tests.rest_client_SUITE.logs/run.2024-04-25_12.18.40/rest_client_suite.add_contact_and_invite.107396.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@26557528e1a5.2024-04-25_12.01.25/big_tests.tests.rest_client_SUITE.logs/run.2024-04-25_12.18.40/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_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_disco =>
#{iqdisc => one_queue,server_info => [],extra_domains => [],
users_can_see_hidden_services => false},
mod_presence => #{},
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@26557528e1a5.2024-04-25_12.01.25"
=== Started at 2024-04-25 12:18:42
*** User 2024-04-25 12:18:43.019 ***🔗
alicE_add_contact_and_invite_3485@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-25 12:18:43.019 ***🔗
alicE_add_contact_and_invite_3485@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='a1fc01e0ed6e67f5' from='localhost' version='1.0' xml:lang='en'>
*** User 2024-04-25 12:18:43.020 ***🔗
alicE_add_contact_and_invite_3485@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-25 12:18:43.020 ***🔗
alicE_add_contact_and_invite_3485@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzQ4NQBtYXR5Z3J5c2E=</auth>
*** User 2024-04-25 12:18:43.021 ***🔗
alicE_add_contact_and_invite_3485@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2024-04-25 12:18:43.021 ***🔗
alicE_add_contact_and_invite_3485@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-25 12:18:43.021 ***🔗
alicE_add_contact_and_invite_3485@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='8c444114cf8e0e19' from='localhost' version='1.0' xml:lang='en' to='alice_add_contact_and_invite_3485@localhost'>
*** User 2024-04-25 12:18:43.021 ***🔗
alicE_add_contact_and_invite_3485@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-25 12:18:43.021 ***🔗
alicE_add_contact_and_invite_3485@localhost/res1 out
<iq type='set' id='5c040c66155aefded25af5e8f102d808'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2024-04-25 12:18:43.022 ***🔗
alicE_add_contact_and_invite_3485@localhost/res1 in
<iq id='5c040c66155aefded25af5e8f102d808' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alice_add_contact_and_invite_3485@localhost/res1</jid>
</bind>
</iq>
*** User 2024-04-25 12:18:43.022 ***🔗
alice_add_contact_and_invite_3485@localhost/res1 out
<iq type='set' id='a04128b145a6aa8d6011f01656fc5753'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-25 12:18:43.022 ***🔗
alice_add_contact_and_invite_3485@localhost/res1 in
<iq from='localhost' to='alice_add_contact_and_invite_3485@localhost/res1' id='a04128b145a6aa8d6011f01656fc5753' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-25 12:18:43.023 ***🔗
alice_add_contact_and_invite_3485@localhost/res1 out
<presence/>
*** User 2024-04-25 12:18:43.024 ***🔗
alice_add_contact_and_invite_3485@localhost/res1 in
<presence from='alice_add_contact_and_invite_3485@localhost/res1' to='alice_add_contact_and_invite_3485@localhost/res1'/>
*** User 2024-04-25 12:18:43.025 ***🔗
bOb_add_contact_and_invite_3485@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-25 12:18:43.025 ***🔗
bOb_add_contact_and_invite_3485@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='7847c084abe3458a' from='localhost' version='1.0' xml:lang='en'>
*** User 2024-04-25 12:18:43.025 ***🔗
bOb_add_contact_and_invite_3485@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-25 12:18:43.025 ***🔗
bOb_add_contact_and_invite_3485@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9hZGRfY29udGFjdF9hbmRfaW52aXRlXzM0ODUAbWFrcm9saWth</auth>
*** User 2024-04-25 12:18:43.026 ***🔗
bOb_add_contact_and_invite_3485@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2024-04-25 12:18:43.026 ***🔗
bOb_add_contact_and_invite_3485@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-25 12:18:43.027 ***🔗
bOb_add_contact_and_invite_3485@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='6aac456b8e08eb8b' from='localhost' version='1.0' xml:lang='en' to='bob_add_contact_and_invite_3485@localhost'>
*** User 2024-04-25 12:18:43.027 ***🔗
bOb_add_contact_and_invite_3485@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-25 12:18:43.027 ***🔗
bOb_add_contact_and_invite_3485@localhost/res1 out
<iq type='set' id='ce51cd30fff0a6983a1a87eadbc0083d'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2024-04-25 12:18:43.027 ***🔗
bOb_add_contact_and_invite_3485@localhost/res1 in
<iq id='ce51cd30fff0a6983a1a87eadbc0083d' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bob_add_contact_and_invite_3485@localhost/res1</jid>
</bind>
</iq>
*** User 2024-04-25 12:18:43.028 ***🔗
bob_add_contact_and_invite_3485@localhost/res1 out
<iq type='set' id='6c015703d87444a7b726572f179ffc96'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-25 12:18:43.028 ***🔗
bob_add_contact_and_invite_3485@localhost/res1 in
<iq from='localhost' to='bob_add_contact_and_invite_3485@localhost/res1' id='6c015703d87444a7b726572f179ffc96' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-25 12:18:43.028 ***🔗
bob_add_contact_and_invite_3485@localhost/res1 out
<presence/>
*** User 2024-04-25 12:18:43.030 ***🔗
bob_add_contact_and_invite_3485@localhost/res1 in
<presence from='bob_add_contact_and_invite_3485@localhost/res1' to='bob_add_contact_and_invite_3485@localhost/res1'/>
*** User 2024-04-25 12:18:43.053 ***🔗
REST request:
Code: 200
Req: {<0.89447.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"b345317f9e7ed474">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzQ4NUBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 25 Apr 2024 12:18:42 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"2">>}],
<<"[]">>,125,16921}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
method => <<"GET">>,role => client,
creds =>
{<<"bob_add_contact_and_invite_3485@localhost">>,
<<"makrolika">>},
body => <<>>,return_headers => true}
*** User 2024-04-25 12:18:43.072 ***🔗
REST request:
Code: 204
Req: {<0.89483.0>,<<"/api/contacts">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"83d00afdc9721162">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzQ4NUBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<"{\"jid\":\"alice_add_contact_and_invite_3485@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 25 Apr 2024 12:18:42 GMT">>}],
<<>>,80,8700}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
method => <<"POST">>,role => client,
creds =>
{<<"bob_add_contact_and_invite_3485@localhost">>,
<<"makrolika">>},
body =>
<<"{\"jid\":\"alice_add_contact_and_invite_3485@localhost\"}">>,
return_headers => true}
*** User 2024-04-25 12:18:43.072 ***🔗
bob_add_contact_and_invite_3485@localhost/res1 in
<iq from='bob_add_contact_and_invite_3485@localhost' to='bob_add_contact_and_invite_3485@localhost/res1' id='push594db05776940657' type='set'>
<query xmlns='jabber:iq:roster'>
<item jid='alice_add_contact_and_invite_3485@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-25 12:18:43.085 ***🔗
REST request:
Code: 200
Req: {<0.89508.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"ee8d429467ab0913">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzQ4NUBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 25 Apr 2024 12:18:42 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"90">>}],
<<"[{\"ask\":\"none\",\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_invite_3485@localhost\"}]">>,
214,5247}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
method => <<"GET">>,role => client,
creds =>
{<<"bob_add_contact_and_invite_3485@localhost">>,
<<"makrolika">>},
body => <<>>,return_headers => true}
*** User 2024-04-25 12:18:43.100 ***🔗
REST request:
Code: 204
Req: {<0.89542.0>,
<<"/api/contacts/alice_add_contact_and_invite_3485@localhost">>,
<<"PUT">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"a4dd4fdacaeb0119">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzQ4NUBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<"{\"action\":\"invite\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 25 Apr 2024 12:18:42 GMT">>}],
<<>>,80,7501}
Params: #{path =>
<<"/api/contacts/alice_add_contact_and_invite_3485@localhost">>,
server => #{node => mongooseim@localhost},
method => <<"PUT">>,role => client,
creds =>
{<<"bob_add_contact_and_invite_3485@localhost">>,
<<"makrolika">>},
body => <<"{\"action\":\"invite\"}">>,return_headers => true}
*** User 2024-04-25 12:18:43.100 ***🔗
bob_add_contact_and_invite_3485@localhost/res1 in
<iq from='bob_add_contact_and_invite_3485@localhost' to='bob_add_contact_and_invite_3485@localhost/res1' id='pushbbbc8879e7d77936' type='set'>
<query xmlns='jabber:iq:roster'>
<item ask='subscribe' jid='alice_add_contact_and_invite_3485@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-25 12:18:43.101 ***🔗
Push2: {xmlel,<<"iq">>,
[{<<"from">>,<<"bob_add_contact_and_invite_3485@localhost">>},
{<<"to">>,<<"bob_add_contact_and_invite_3485@localhost/res1">>},
{<<"id">>,<<"pushbbbc8879e7d77936">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:roster">>}],
[{xmlel,<<"item">>,
[{<<"ask">>,<<"subscribe">>},
{<<"jid">>,
<<"alice_add_contact_and_invite_3485@localhost">>},
{<<"subscription">>,<<"none">>}],
[]}]}]}
*** User 2024-04-25 12:18:43.101 ***🔗
alice_add_contact_and_invite_3485@localhost/res1 in
<presence from='bob_add_contact_and_invite_3485@localhost' to='alice_add_contact_and_invite_3485@localhost/res1' type='subscribe'/>
*** User 2024-04-25 12:18:43.135 ***🔗
REST request:
Code: 200
Req: {<0.89586.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"cac4edcfbee19b52">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzQ4NUBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 25 Apr 2024 12:18:42 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"89">>}],
<<"[{\"ask\":\"out\",\"subscription\":\"none\",\"jid\":\"alice_add_contact_and_invite_3485@localhost\"}]">>,
213,6522}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
method => <<"GET">>,role => client,
creds =>
{<<"bob_add_contact_and_invite_3485@localhost">>,
<<"makrolika">>},
body => <<>>,return_headers => true}
*** User 2024-04-25 12:18:43.136 ***🔗
alice_add_contact_and_invite_3485@localhost/res1 out
<iq type='set' id='07e5d92aca3e2fa169ee8676aa598f25'>
<query xmlns='jabber:iq:roster'>
<item jid='bob_add_contact_and_invite_3485@localhost' name='Bob'/>
</query>
</iq>
*** User 2024-04-25 12:18:43.147 ***🔗
alice_add_contact_and_invite_3485@localhost/res1 in
<iq from='alice_add_contact_and_invite_3485@localhost' to='alice_add_contact_and_invite_3485@localhost/res1' id='pushe4e2076e497d0d99' type='set'>
<query xmlns='jabber:iq:roster'>
<item name='Bob' jid='bob_add_contact_and_invite_3485@localhost' subscription='none'/>
</query>
</iq>
*** User 2024-04-25 12:18:43.148 ***🔗
alice_add_contact_and_invite_3485@localhost/res1 out
<iq to='alice_add_contact_and_invite_3485@localhost' id='pushe4e2076e497d0d99' type='result'/>
*** User 2024-04-25 12:18:43.148 ***🔗
alice_add_contact_and_invite_3485@localhost/res1 in
<iq from='alice_add_contact_and_invite_3485@localhost' to='alice_add_contact_and_invite_3485@localhost/res1' id='07e5d92aca3e2fa169ee8676aa598f25' type='result'/>
*** User 2024-04-25 12:18:43.148 ***🔗
alice_add_contact_and_invite_3485@localhost/res1 out
<presence type='subscribed' to='bob_add_contact_and_invite_3485@localhost'/>
*** User 2024-04-25 12:18:43.159 ***🔗
bob_add_contact_and_invite_3485@localhost/res1 in
<iq from='bob_add_contact_and_invite_3485@localhost' to='bob_add_contact_and_invite_3485@localhost/res1' id='push446aa2b00aac7536' type='set'>
<query xmlns='jabber:iq:roster'>
<item jid='alice_add_contact_and_invite_3485@localhost' subscription='to'/>
</query>
</iq>
*** User 2024-04-25 12:18:43.159 ***🔗
Push3 {xmlel,<<"iq">>,
[{<<"from">>,<<"bob_add_contact_and_invite_3485@localhost">>},
{<<"to">>,<<"bob_add_contact_and_invite_3485@localhost/res1">>},
{<<"id">>,<<"push446aa2b00aac7536">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:roster">>}],
[{xmlel,<<"item">>,
[{<<"jid">>,
<<"alice_add_contact_and_invite_3485@localhost">>},
{<<"subscription">>,<<"to">>}],
[]}]}]}
*** User 2024-04-25 12:18:43.168 ***🔗
REST request:
Code: 200
Req: {<0.89632.0>,<<"/api/contacts">>,<<"GET">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"02d3bb647eb8f272">>},
{<<"authorization">>,
<<"Basic Ym9iX2FkZF9jb250YWN0X2FuZF9pbnZpdGVfMzQ4NUBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
<<>>}
Result: {{<<"200">>,<<"OK">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 25 Apr 2024 12:18:42 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"88">>}],
<<"[{\"ask\":\"none\",\"subscription\":\"to\",\"jid\":\"alice_add_contact_and_invite_3485@localhost\"}]">>,
212,3528}
Params: #{path => <<"/api/contacts">>,
server => #{node => mongooseim@localhost},
method => <<"GET">>,role => client,
creds =>
{<<"bob_add_contact_and_invite_3485@localhost">>,
<<"makrolika">>},
body => <<>>,return_headers => true}
*** User 2024-04-25 12:18:43.168 ***🔗
bob_add_contact_and_invite_3485@localhost/res1 out
</stream:stream>
*** User 2024-04-25 12:18:43.168 ***🔗
bob_add_contact_and_invite_3485@localhost/res1 in
</stream:stream>
*** User 2024-04-25 12:18:43.168 ***🔗
alice_add_contact_and_invite_3485@localhost/res1 out
</stream:stream>
*** User 2024-04-25 12:18:43.169 ***🔗
alice_add_contact_and_invite_3485@localhost/res1 in
</stream:stream>
=== Ended at 2024-04-25 12:18:43
=== successfully completed test case
=== === Returned value: ok