=== Test case: muc_light_http_api_SUITE:send_message_to_room/1 (click for source code)

=== Config value:

    [{watchdog,<0.28988.1>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/muc_light_http_api_SUITE_data"},
     {preset,"odbc_mssql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-01-27_15.34.18/muc_light_http_api_suite.send_message_to_room.99459.html"},
     {tc_group_properties,[{name,positive},parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/muc_light_http_api_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-01-27_15.34.18/log_private/"},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {bob,[{username,<<"bOb">>},
                           {server,<<"localhost">>},
                           {password,<<"makrolika">>}]},
                     {kate,[{username,<<"kate">>},
                            {server,<<"localhost">>},
                            {password,<<"makrowe;p">>}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11"

=== Started at 2022-01-27 15:34:18


*** CT 2022-01-27 15:34:18.266 *** View log from node mongooseim@localhost when started mongooseim@localhost_5384.html
*** CT 2022-01-27 15:34:18.266 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2348.html

*** User 2022-01-27 15:34:18.280 ***
alicE_send_message_to_room_1789@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 15:34:18.280 ***
alicE_send_message_to_room_1789@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='728ba20fe986cc6a' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:18.280 ***
alicE_send_message_to_room_1789@localhost/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-01-27 15:34:18.280 ***
alicE_send_message_to_room_1789@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3NlbmRfbWVzc2FnZV90b19yb29tXzE3ODkAbWF0eWdyeXNh</auth>



*** User 2022-01-27 15:34:18.282 ***
alicE_send_message_to_room_1789@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 15:34:18.282 ***
alicE_send_message_to_room_1789@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 15:34:18.282 ***
alicE_send_message_to_room_1789@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='323d4cdb8d3cd4cf' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:18.282 ***
alicE_send_message_to_room_1789@localhost/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-01-27 15:34:18.282 ***
alicE_send_message_to_room_1789@localhost/res1 out
<iq type='set' id='7e52a7d262d6b2f9cbbb99e1e17448ac'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:34:18.283 ***
alicE_send_message_to_room_1789@localhost/res1 in
<iq id='7e52a7d262d6b2f9cbbb99e1e17448ac' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_send_message_to_room_1789@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:34:18.283 ***
alicE_send_message_to_room_1789@localhost/res1 out
<iq type='set' id='d21e15ab8b8e4f76bedef940df9fa37b'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:18.283 ***
alicE_send_message_to_room_1789@localhost/res1 in
<iq type='result' id='d21e15ab8b8e4f76bedef940df9fa37b'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:18.283 ***
alicE_send_message_to_room_1789@localhost/res1 out
<presence/>



*** User 2022-01-27 15:34:18.290 ***
alicE_send_message_to_room_1789@localhost/res1 in
<presence from='alicE_send_message_to_room_1789@localhost/res1' to='alice_send_message_to_room_1789@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:34:18.291 ***
bOb_send_message_to_room_1789@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 15:34:18.291 ***
bOb_send_message_to_room_1789@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='ccd1e0831a3e6458' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:18.291 ***
bOb_send_message_to_room_1789@localhost/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-01-27 15:34:18.291 ***
bOb_send_message_to_room_1789@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9zZW5kX21lc3NhZ2VfdG9fcm9vbV8xNzg5AG1ha3JvbGlrYQ==</auth>



*** User 2022-01-27 15:34:18.293 ***
bOb_send_message_to_room_1789@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 15:34:18.293 ***
bOb_send_message_to_room_1789@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 15:34:18.294 ***
bOb_send_message_to_room_1789@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9c314bda690059fe' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:18.294 ***
bOb_send_message_to_room_1789@localhost/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-01-27 15:34:18.294 ***
bOb_send_message_to_room_1789@localhost/res1 out
<iq type='set' id='72157d822c92f98a532cd80270fe6a3d'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:34:18.294 ***
bOb_send_message_to_room_1789@localhost/res1 in
<iq id='72157d822c92f98a532cd80270fe6a3d' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_send_message_to_room_1789@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:34:18.294 ***
bOb_send_message_to_room_1789@localhost/res1 out
<iq type='set' id='ec710f5d5156284dee7e08d2ac7198c3'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:18.295 ***
bOb_send_message_to_room_1789@localhost/res1 in
<iq type='result' id='ec710f5d5156284dee7e08d2ac7198c3'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:18.295 ***
bOb_send_message_to_room_1789@localhost/res1 out
<presence/>



*** User 2022-01-27 15:34:18.296 ***
bOb_send_message_to_room_1789@localhost/res1 in
<presence from='bOb_send_message_to_room_1789@localhost/res1' to='bob_send_message_to_room_1789@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:34:18.297 ***
kate_send_message_to_room_1789@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 15:34:18.297 ***
kate_send_message_to_room_1789@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='0ef9337675e8d275' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:18.298 ***
kate_send_message_to_room_1789@localhost/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-01-27 15:34:18.298 ***
kate_send_message_to_room_1789@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfc2VuZF9tZXNzYWdlX3RvX3Jvb21fMTc4OQBtYWtyb3dlO3A=</auth>



*** User 2022-01-27 15:34:18.299 ***
kate_send_message_to_room_1789@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-27 15:34:18.299 ***
kate_send_message_to_room_1789@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-01-27 15:34:18.299 ***
kate_send_message_to_room_1789@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c79519a3ee00ecad' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-27 15:34:18.299 ***
kate_send_message_to_room_1789@localhost/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-01-27 15:34:18.299 ***
kate_send_message_to_room_1789@localhost/res1 out
<iq type='set' id='a3ea3fe92ca63414f4cd64d2cd45356c'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-27 15:34:18.299 ***
kate_send_message_to_room_1789@localhost/res1 in
<iq id='a3ea3fe92ca63414f4cd64d2cd45356c' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>kate_send_message_to_room_1789@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:34:18.300 ***
kate_send_message_to_room_1789@localhost/res1 out
<iq type='set' id='561af8f32d5c14a4a6da02ee67ca6700'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:18.300 ***
kate_send_message_to_room_1789@localhost/res1 in
<iq type='result' id='561af8f32d5c14a4a6da02ee67ca6700'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:34:18.300 ***
kate_send_message_to_room_1789@localhost/res1 out
<presence/>



*** User 2022-01-27 15:34:18.304 ***
kate_send_message_to_room_1789@localhost/res1 in
<presence from='kate_send_message_to_room_1789@localhost/res1' to='kate_send_message_to_room_1789@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:34:18.304 ***
alicE_send_message_to_room_1789@localhost/res1 out
<iq type='set' id='bade6d8ecd1f5ff3c7d639cf6f2ce35e' to='muclight.localhost'>
	<query xmlns='urn:xmpp:muclight:0#create'>
		<configuration>
			<roomname>wonderland</roomname>
		</configuration>
		<occupants>
			<user affiliation='member'>bob_send_message_to_room_1789@localhost</user>
			<user affiliation='member'>kate_send_message_to_room_1789@localhost</user>
		</occupants>
	</query>
</iq>



*** User 2022-01-27 15:34:18.316 ***
alicE_send_message_to_room_1789@localhost/res1 in
<message from='1643-297658-308940@muclight.localhost' to='alice_send_message_to_room_1789@localhost' id='bade6d8ecd1f5ff3c7d639cf6f2ce35e' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1643-297658-308925</version>
		<user affiliation='owner'>alice_send_message_to_room_1789@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-01-27 15:34:18.316 ***
alicE_send_message_to_room_1789@localhost/res1 in
<iq from='muclight.localhost' to='alicE_send_message_to_room_1789@localhost/res1' id='bade6d8ecd1f5ff3c7d639cf6f2ce35e' type='result'/>



*** User 2022-01-27 15:34:18.316 ***
bOb_send_message_to_room_1789@localhost/res1 in
<message from='1643-297658-308940@muclight.localhost' to='bob_send_message_to_room_1789@localhost' id='bade6d8ecd1f5ff3c7d639cf6f2ce35e' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1643-297658-308925</version>
		<user affiliation='member'>bob_send_message_to_room_1789@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-01-27 15:34:18.316 ***
kate_send_message_to_room_1789@localhost/res1 in
<message from='1643-297658-308940@muclight.localhost' to='kate_send_message_to_room_1789@localhost' id='bade6d8ecd1f5ff3c7d639cf6f2ce35e' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1643-297658-308925</version>
		<user affiliation='member'>kate_send_message_to_room_1789@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-01-27 15:34:18.341 ***
REST request:
Code: 204
Req: {<0.29083.1>,
      <<"/api/muc-lights/muclight.localhost/wonderland/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"307d2135c577875f">>}],
      <<"{\"from\":\"alicE_send_message_to_room_1789@localhost\",\"body\":\"Hello everyone!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:34:17 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,23369}
Params: #{body =>
              <<"{\"from\":\"alicE_send_message_to_room_1789@localhost\",\"body\":\"Hello everyone!\"}">>,
          method => <<"POST">>,
          path => <<"/api/muc-lights/muclight.localhost/wonderland/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:34:18.341 ***
bOb_send_message_to_room_1789@localhost/res1 in
<message from='1643-297658-308940@muclight.localhost/alice_send_message_to_room_1789@localhost' to='bob_send_message_to_room_1789@localhost' id='1643-297658-321783' type='groupchat'>
	<body>Hello everyone!</body>
</message>



*** User 2022-01-27 15:34:18.341 ***
kate_send_message_to_room_1789@localhost/res1 in
<message from='1643-297658-308940@muclight.localhost/alice_send_message_to_room_1789@localhost' to='kate_send_message_to_room_1789@localhost' id='1643-297658-321783' type='groupchat'>
	<body>Hello everyone!</body>
</message>



*** User 2022-01-27 15:34:18.341 ***
kate_send_message_to_room_1789@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:34:18.342 ***
kate_send_message_to_room_1789@localhost/res1 in
</stream:stream>

*** User 2022-01-27 15:34:18.342 ***
bOb_send_message_to_room_1789@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:34:18.342 ***
bOb_send_message_to_room_1789@localhost/res1 in
</stream:stream>

*** User 2022-01-27 15:34:18.343 ***
alicE_send_message_to_room_1789@localhost/res1 out
</stream:stream>

*** User 2022-01-27 15:34:18.343 ***
alicE_send_message_to_room_1789@localhost/res1 in
</stream:stream>
*** CT 2022-01-27 15:34:18.347 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2348.html
*** CT 2022-01-27 15:34:18.347 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5385.html



=== Ended at 2022-01-27 15:34:18
=== successfully completed test case
=== === Returned value: ok