=== Test case: muc_http_api_SUITE:invite_online_user_to_room/1 (click for source code)

=== Config value:

    [{watchdog,<0.26534.1>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/muc_http_api_SUITE_data"},
     {preset,"pgsql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@a4fd8d8e9aae.2022-05-18_09.59.33/big_tests.tests.muc_http_api_SUITE.logs/run.2022-05-18_10.07.05/muc_http_api_suite.invite_online_user_to_room.138754.html"},
     {tc_group_properties,[{name,positive},{repeat_until_all_ok,3},parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/muc_http_api_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@a4fd8d8e9aae.2022-05-18_09.59.33/big_tests.tests.muc_http_api_SUITE.logs/run.2022-05-18_10.07.05/log_private/"},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"domain.example.com">>},
                             {host,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {bob,[{username,<<"bOb">>},
                           {server,<<"domain.example.com">>},
                           {host,<<"localhost">>},
                           {password,<<"makrolika">>}]},
                     {kate,[{username,<<"kate">>},
                            {server,<<"domain.example.com">>},
                            {host,<<"localhost">>},
                            {password,<<"makrowe;p">>}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@a4fd8d8e9aae.2022-05-18_09.59.33"

=== Started at 2022-05-18 10:07:05


*** CT 2022-05-18 10:07:05.523 *** View log from node mongooseim@localhost when started mongooseim@localhost_2250.html
*** CT 2022-05-18 10:07:05.523 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_494.html

*** User 2022-05-18 10:07:05.537 ***
alicE_invite_online_user_to_room_1784@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-18 10:07:05.537 ***
alicE_invite_online_user_to_room_1784@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1a7055449239c9a4' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-18 10:07:05.538 ***
alicE_invite_online_user_to_room_1784@domain.example.com/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-05-18 10:07:05.538 ***
alicE_invite_online_user_to_room_1784@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2ludml0ZV9vbmxpbmVfdXNlcl90b19yb29tXzE3ODQAbWF0eWdyeXNh</auth>



*** User 2022-05-18 10:07:05.538 ***
alicE_invite_online_user_to_room_1784@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-18 10:07:05.538 ***
alicE_invite_online_user_to_room_1784@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-18 10:07:05.539 ***
alicE_invite_online_user_to_room_1784@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b0eab30f95b5b2d2' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-18 10:07:05.539 ***
alicE_invite_online_user_to_room_1784@domain.example.com/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-05-18 10:07:05.539 ***
alicE_invite_online_user_to_room_1784@domain.example.com/res1 out
<iq type='set' id='1eb0a0132190ddf4d385c56788441fc8'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-18 10:07:05.539 ***
alicE_invite_online_user_to_room_1784@domain.example.com/res1 in
<iq id='1eb0a0132190ddf4d385c56788441fc8' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_invite_online_user_to_room_1784@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-05-18 10:07:05.540 ***
alice_invite_online_user_to_room_1784@domain.example.com/res1 out
<iq type='set' id='73d93c15f7f8e727b178a184635cb97e'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-18 10:07:05.540 ***
alice_invite_online_user_to_room_1784@domain.example.com/res1 in
<iq type='result' id='73d93c15f7f8e727b178a184635cb97e'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-18 10:07:05.540 ***
alice_invite_online_user_to_room_1784@domain.example.com/res1 out
<presence/>



*** User 2022-05-18 10:07:05.548 ***
alice_invite_online_user_to_room_1784@domain.example.com/res1 in
<presence from='alice_invite_online_user_to_room_1784@domain.example.com/res1' to='alice_invite_online_user_to_room_1784@domain.example.com/res1' xml:lang='en'/>



*** User 2022-05-18 10:07:05.550 ***
bOb_invite_online_user_to_room_1784@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-18 10:07:05.555 ***
bOb_invite_online_user_to_room_1784@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d86a0ffbaffbc6bc' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-18 10:07:05.555 ***
bOb_invite_online_user_to_room_1784@domain.example.com/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-05-18 10:07:05.555 ***
bOb_invite_online_user_to_room_1784@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9pbnZpdGVfb25saW5lX3VzZXJfdG9fcm9vbV8xNzg0AG1ha3JvbGlrYQ==</auth>



*** User 2022-05-18 10:07:05.556 ***
bOb_invite_online_user_to_room_1784@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-18 10:07:05.556 ***
bOb_invite_online_user_to_room_1784@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-18 10:07:05.557 ***
bOb_invite_online_user_to_room_1784@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='49dca4a872b854c7' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-18 10:07:05.557 ***
bOb_invite_online_user_to_room_1784@domain.example.com/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-05-18 10:07:05.557 ***
bOb_invite_online_user_to_room_1784@domain.example.com/res1 out
<iq type='set' id='295df354ca83dac5f8b8d2263e5f3241'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-18 10:07:05.558 ***
bOb_invite_online_user_to_room_1784@domain.example.com/res1 in
<iq id='295df354ca83dac5f8b8d2263e5f3241' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_invite_online_user_to_room_1784@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-05-18 10:07:05.558 ***
bob_invite_online_user_to_room_1784@domain.example.com/res1 out
<iq type='set' id='533e3e6c7523914d2eee161f1b3c5c6f'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-18 10:07:05.558 ***
bob_invite_online_user_to_room_1784@domain.example.com/res1 in
<iq type='result' id='533e3e6c7523914d2eee161f1b3c5c6f'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-18 10:07:05.558 ***
bob_invite_online_user_to_room_1784@domain.example.com/res1 out
<presence/>



*** User 2022-05-18 10:07:05.560 ***
bob_invite_online_user_to_room_1784@domain.example.com/res1 in
<presence from='bob_invite_online_user_to_room_1784@domain.example.com/res1' to='bob_invite_online_user_to_room_1784@domain.example.com/res1' xml:lang='en'/>



*** User 2022-05-18 10:07:05.575 ***
REST request fails:
Code: 404
Req: {<0.26604.1>,
      <<"/api/mucs/domain.example.com/wonderland-25.524402/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"13785bd6772eef52">>}],
      <<"{\"sender\":\"alice_invite_online_user_to_room_1784@domain.example.com\",\"recipient\":\"bob_invite_online_user_to_room_1784@domain.example.com\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 18 May 2022 10:07:05 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"14">>}],
         <<"Room not found">>,145,3832}
Params: #{body =>
              <<"{\"sender\":\"alice_invite_online_user_to_room_1784@domain.example.com\",\"recipient\":\"bob_invite_online_user_to_room_1784@domain.example.com\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/mucs/domain.example.com/wonderland-25.524402/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-05-18 10:07:05.590 ***
REST request:
Code: 201
Req: {<0.26606.1>,<<"/api/mucs/domain.example.com">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"a0ca56ad72df3818">>}],
      <<"{\"owner\":\"alice_invite_online_user_to_room_1784@domain.example.com\",\"nick\":\"ali\",\"name\":\"wonderland-25.524402\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/domain.example.com/wonderland-25.524402">>},
          {<<"date">>,<<"Wed, 18 May 2022 10:07:05 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"20">>}],
         <<"wonderland-25.524402">>,231,7232}
Params: #{body =>
              <<"{\"owner\":\"alice_invite_online_user_to_room_1784@domain.example.com\",\"nick\":\"ali\",\"name\":\"wonderland-25.524402\"}">>,
          method => <<"POST">>,path => <<"/api/mucs/domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-05-18 10:07:05.597 ***
REST request:
Code: 204
Req: {<0.26612.1>,
      <<"/api/mucs/domain.example.com/wonderland-25.524402/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"7de5820dc6f200af">>}],
      <<"{\"sender\":\"alice_invite_online_user_to_room_1784@domain.example.com\",\"recipient\":\"bob_invite_online_user_to_room_1784@domain.example.com\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 18 May 2022 10:07:05 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,991}
Params: #{body =>
              <<"{\"sender\":\"alice_invite_online_user_to_room_1784@domain.example.com\",\"recipient\":\"bob_invite_online_user_to_room_1784@domain.example.com\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/mucs/domain.example.com/wonderland-25.524402/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-05-18 10:07:05.597 ***
bob_invite_online_user_to_room_1784@domain.example.com/res1 in
<message from='alice_invite_online_user_to_room_1784@domain.example.com' to='bob_invite_online_user_to_room_1784@domain.example.com'>
	<x xmlns='jabber:x:conference' jid='wonderland-25.524402@groupchats.domain.example.com' reason="I think you'll like this room!"/>
</message>



*** User 2022-05-18 10:07:05.597 ***
bob_invite_online_user_to_room_1784@domain.example.com/res1 out
</stream:stream>

*** User 2022-05-18 10:07:05.598 ***
bob_invite_online_user_to_room_1784@domain.example.com/res1 in
</stream:stream>

*** User 2022-05-18 10:07:05.598 ***
alice_invite_online_user_to_room_1784@domain.example.com/res1 out
</stream:stream>

*** User 2022-05-18 10:07:05.607 ***
alice_invite_online_user_to_room_1784@domain.example.com/res1 in
</stream:stream>
*** CT 2022-05-18 10:07:05.616 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_494.html
*** CT 2022-05-18 10:07:05.618 *** View log from node mongooseim@localhost when finished mongooseim@localhost_2250.html



=== Ended at 2022-05-18 10:07:05
=== successfully completed test case
=== === Returned value: ok