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

=== Config value:

    [{watchdog,<0.21588.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@333794cb5a72.2022-03-07_15.57.24/big_tests.tests.muc_http_api_SUITE.logs/run.2022-03-07_16.04.13/muc_http_api_suite.invite_online_user_to_room.155266.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@333794cb5a72.2022-03-07_15.57.24/big_tests.tests.muc_http_api_SUITE.logs/run.2022-03-07_16.04.13/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@333794cb5a72.2022-03-07_15.57.24"

=== Started at 2022-03-07 16:04:13


*** CT 2022-03-07 16:04:13.219 *** View log from node mongooseim@localhost when started mongooseim@localhost_1379.html
*** CT 2022-03-07 16:04:13.220 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_502.html

*** User 2022-03-07 16:04:13.228 ***
alicE_invite_online_user_to_room_1658@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-03-07 16:04:13.228 ***
alicE_invite_online_user_to_room_1658@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4a634fed0dc7071d' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-07 16:04:13.228 ***
alicE_invite_online_user_to_room_1658@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-03-07 16:04:13.228 ***
alicE_invite_online_user_to_room_1658@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2ludml0ZV9vbmxpbmVfdXNlcl90b19yb29tXzE2NTgAbWF0eWdyeXNh</auth>



*** User 2022-03-07 16:04:13.229 ***
alicE_invite_online_user_to_room_1658@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-07 16:04:13.229 ***
alicE_invite_online_user_to_room_1658@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-03-07 16:04:13.230 ***
alicE_invite_online_user_to_room_1658@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='40367ae7ab88810e' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-07 16:04:13.230 ***
alicE_invite_online_user_to_room_1658@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-03-07 16:04:13.230 ***
alicE_invite_online_user_to_room_1658@domain.example.com/res1 out
<iq type='set' id='0facc3915a858a052e7121fecadebca9'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-07 16:04:13.230 ***
alicE_invite_online_user_to_room_1658@domain.example.com/res1 in
<iq id='0facc3915a858a052e7121fecadebca9' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_invite_online_user_to_room_1658@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-03-07 16:04:13.230 ***
alicE_invite_online_user_to_room_1658@domain.example.com/res1 out
<iq type='set' id='b488cdb8029d1bcfef0db1301bc4fa66'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 16:04:13.230 ***
alicE_invite_online_user_to_room_1658@domain.example.com/res1 in
<iq type='result' id='b488cdb8029d1bcfef0db1301bc4fa66'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 16:04:13.230 ***
alicE_invite_online_user_to_room_1658@domain.example.com/res1 out
<presence/>



*** User 2022-03-07 16:04:13.232 ***
alicE_invite_online_user_to_room_1658@domain.example.com/res1 in
<presence from='alicE_invite_online_user_to_room_1658@domain.example.com/res1' to='alice_invite_online_user_to_room_1658@domain.example.com/res1' xml:lang='en'/>



*** User 2022-03-07 16:04:13.232 ***
bOb_invite_online_user_to_room_1658@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-03-07 16:04:13.233 ***
bOb_invite_online_user_to_room_1658@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d7796adc37078ea6' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-07 16:04:13.233 ***
bOb_invite_online_user_to_room_1658@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-03-07 16:04:13.233 ***
bOb_invite_online_user_to_room_1658@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9pbnZpdGVfb25saW5lX3VzZXJfdG9fcm9vbV8xNjU4AG1ha3JvbGlrYQ==</auth>



*** User 2022-03-07 16:04:13.234 ***
bOb_invite_online_user_to_room_1658@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-07 16:04:13.234 ***
bOb_invite_online_user_to_room_1658@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-03-07 16:04:13.234 ***
bOb_invite_online_user_to_room_1658@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='26c079ca92e83874' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-03-07 16:04:13.234 ***
bOb_invite_online_user_to_room_1658@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-03-07 16:04:13.234 ***
bOb_invite_online_user_to_room_1658@domain.example.com/res1 out
<iq type='set' id='1cbb6a9f4fb911ebe4e444163edcc5ae'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-07 16:04:13.235 ***
bOb_invite_online_user_to_room_1658@domain.example.com/res1 in
<iq id='1cbb6a9f4fb911ebe4e444163edcc5ae' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_invite_online_user_to_room_1658@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-03-07 16:04:13.235 ***
bOb_invite_online_user_to_room_1658@domain.example.com/res1 out
<iq type='set' id='e244d05c79c5e2d437cff01f9cf42b3c'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 16:04:13.235 ***
bOb_invite_online_user_to_room_1658@domain.example.com/res1 in
<iq type='result' id='e244d05c79c5e2d437cff01f9cf42b3c'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-07 16:04:13.235 ***
bOb_invite_online_user_to_room_1658@domain.example.com/res1 out
<presence/>



*** User 2022-03-07 16:04:13.244 ***
bOb_invite_online_user_to_room_1658@domain.example.com/res1 in
<presence from='bOb_invite_online_user_to_room_1658@domain.example.com/res1' to='bob_invite_online_user_to_room_1658@domain.example.com/res1' xml:lang='en'/>



*** User 2022-03-07 16:04:13.249 ***
REST request fails:
Code: 404
Req: {<0.21659.1>,
      <<"/api/mucs/domain.example.com/wonderland-53.220446/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"23b21e6d092bb19e">>}],
      <<"{\"sender\":\"alicE_invite_online_user_to_room_1658@domain.example.com\",\"recipient\":\"bOb_invite_online_user_to_room_1658@domain.example.com\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:04:12 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"19">>}],
         <<"room does not exist">>,150,4126}
Params: #{body =>
              <<"{\"sender\":\"alicE_invite_online_user_to_room_1658@domain.example.com\",\"recipient\":\"bOb_invite_online_user_to_room_1658@domain.example.com\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/mucs/domain.example.com/wonderland-53.220446/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:04:13.253 ***
REST request:
Code: 201
Req: {<0.21663.1>,<<"/api/mucs/domain.example.com">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4e8253f5b0550a5c">>}],
      <<"{\"owner\":\"alicE_invite_online_user_to_room_1658@domain.example.com\",\"nick\":\"ali\",\"name\":\"wonderland-53.220446\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"location">>,
           <<"http://localhost:8088/api/mucs/domain.example.com/wonderland-53.220446">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:04:12 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"20">>}],
         <<"wonderland-53.220446">>,231,2257}
Params: #{body =>
              <<"{\"owner\":\"alicE_invite_online_user_to_room_1658@domain.example.com\",\"nick\":\"ali\",\"name\":\"wonderland-53.220446\"}">>,
          method => <<"POST">>,path => <<"/api/mucs/domain.example.com">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:04:13.256 ***
REST request:
Code: 204
Req: {<0.21672.1>,
      <<"/api/mucs/domain.example.com/wonderland-53.220446/participants">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"9d9cd7105905b1a7">>}],
      <<"{\"sender\":\"alicE_invite_online_user_to_room_1658@domain.example.com\",\"recipient\":\"bOb_invite_online_user_to_room_1658@domain.example.com\",\"reason\":\"I think you'll like this room!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 07 Mar 2022 16:04:12 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,943}
Params: #{body =>
              <<"{\"sender\":\"alicE_invite_online_user_to_room_1658@domain.example.com\",\"recipient\":\"bOb_invite_online_user_to_room_1658@domain.example.com\",\"reason\":\"I think you'll like this room!\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/mucs/domain.example.com/wonderland-53.220446/participants">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-07 16:04:13.256 ***
bOb_invite_online_user_to_room_1658@domain.example.com/res1 in
<message from='alicE_invite_online_user_to_room_1658@domain.example.com' to='bOb_invite_online_user_to_room_1658@domain.example.com'>
	<x xmlns='jabber:x:conference' jid='wonderland-53.220446@groupchats.domain.example.com' reason="I think you'll like this room!"/>
</message>



*** User 2022-03-07 16:04:13.256 ***
bOb_invite_online_user_to_room_1658@domain.example.com/res1 out
</stream:stream>

*** User 2022-03-07 16:04:13.256 ***
bOb_invite_online_user_to_room_1658@domain.example.com/res1 in
</stream:stream>

*** User 2022-03-07 16:04:13.256 ***
alicE_invite_online_user_to_room_1658@domain.example.com/res1 out
</stream:stream>

*** User 2022-03-07 16:04:13.257 ***
alicE_invite_online_user_to_room_1658@domain.example.com/res1 in
</stream:stream>
*** CT 2022-03-07 16:04:13.259 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_502.html
*** CT 2022-03-07 16:04:13.260 *** View log from node mongooseim@localhost when finished mongooseim@localhost_1381.html



=== Ended at 2022-03-07 16:04:13
=== successfully completed test case
=== === Returned value: ok