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

=== Config value:

    [{watchdog,<0.28419.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@ebe8a8f9fc53.2022-01-25_16.21.59/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-01-25_16.31.49/muc_light_http_api_suite.send_message_to_room.121602.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@ebe8a8f9fc53.2022-01-25_16.21.59/big_tests.tests.muc_light_http_api_SUITE.logs/run.2022-01-25_16.31.49/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@ebe8a8f9fc53.2022-01-25_16.21.59"

=== Started at 2022-01-25 16:31:50


*** CT 2022-01-25 16:31:50.152 *** View log from node mongooseim@localhost when started mongooseim@localhost_5398.html
*** CT 2022-01-25 16:31:50.153 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2339.html

*** User 2022-01-25 16:31:50.171 ***
alicE_send_message_to_room_1859@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-25 16:31:50.171 ***
alicE_send_message_to_room_1859@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='308055ca6879b894' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-25 16:31:50.171 ***
alicE_send_message_to_room_1859@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-25 16:31:50.171 ***
alicE_send_message_to_room_1859@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3NlbmRfbWVzc2FnZV90b19yb29tXzE4NTkAbWF0eWdyeXNh</auth>



*** User 2022-01-25 16:31:50.172 ***
alicE_send_message_to_room_1859@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-25 16:31:50.172 ***
alicE_send_message_to_room_1859@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-25 16:31:50.172 ***
alicE_send_message_to_room_1859@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c8c2bedce1775445' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-25 16:31:50.172 ***
alicE_send_message_to_room_1859@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-25 16:31:50.173 ***
alicE_send_message_to_room_1859@localhost/res1 out
<iq type='set' id='16effcfd59cd6d5b15db3ccb8fd47e0e'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-25 16:31:50.173 ***
alicE_send_message_to_room_1859@localhost/res1 in
<iq id='16effcfd59cd6d5b15db3ccb8fd47e0e' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_send_message_to_room_1859@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-25 16:31:50.173 ***
alicE_send_message_to_room_1859@localhost/res1 out
<iq type='set' id='b474b2e2f768637a64beea355be826fc'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-25 16:31:50.173 ***
alicE_send_message_to_room_1859@localhost/res1 in
<iq type='result' id='b474b2e2f768637a64beea355be826fc'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-25 16:31:50.173 ***
alicE_send_message_to_room_1859@localhost/res1 out
<presence/>



*** User 2022-01-25 16:31:50.175 ***
alicE_send_message_to_room_1859@localhost/res1 in
<presence from='alicE_send_message_to_room_1859@localhost/res1' to='alice_send_message_to_room_1859@localhost/res1' xml:lang='en'/>



*** User 2022-01-25 16:31:50.175 ***
bOb_send_message_to_room_1859@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-25 16:31:50.176 ***
bOb_send_message_to_room_1859@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='25ad4aadd2ae2b59' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-25 16:31:50.176 ***
bOb_send_message_to_room_1859@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-25 16:31:50.176 ***
bOb_send_message_to_room_1859@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9zZW5kX21lc3NhZ2VfdG9fcm9vbV8xODU5AG1ha3JvbGlrYQ==</auth>



*** User 2022-01-25 16:31:50.177 ***
bOb_send_message_to_room_1859@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-25 16:31:50.177 ***
bOb_send_message_to_room_1859@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-25 16:31:50.178 ***
bOb_send_message_to_room_1859@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='59fb19233e757035' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-25 16:31:50.178 ***
bOb_send_message_to_room_1859@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-25 16:31:50.178 ***
bOb_send_message_to_room_1859@localhost/res1 out
<iq type='set' id='f3c43b6e6b1fb6ce24dbb53afc32faf2'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-25 16:31:50.178 ***
bOb_send_message_to_room_1859@localhost/res1 in
<iq id='f3c43b6e6b1fb6ce24dbb53afc32faf2' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_send_message_to_room_1859@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-25 16:31:50.178 ***
bOb_send_message_to_room_1859@localhost/res1 out
<iq type='set' id='8b4526ce981f2311021568b4c75f4b6a'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-25 16:31:50.179 ***
bOb_send_message_to_room_1859@localhost/res1 in
<iq type='result' id='8b4526ce981f2311021568b4c75f4b6a'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-25 16:31:50.179 ***
bOb_send_message_to_room_1859@localhost/res1 out
<presence/>



*** User 2022-01-25 16:31:50.180 ***
bOb_send_message_to_room_1859@localhost/res1 in
<presence from='bOb_send_message_to_room_1859@localhost/res1' to='bob_send_message_to_room_1859@localhost/res1' xml:lang='en'/>



*** User 2022-01-25 16:31:50.180 ***
kate_send_message_to_room_1859@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-25 16:31:50.181 ***
kate_send_message_to_room_1859@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b89e038e090360d5' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-25 16:31:50.181 ***
kate_send_message_to_room_1859@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-25 16:31:50.181 ***
kate_send_message_to_room_1859@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfc2VuZF9tZXNzYWdlX3RvX3Jvb21fMTg1OQBtYWtyb3dlO3A=</auth>



*** User 2022-01-25 16:31:50.182 ***
kate_send_message_to_room_1859@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-01-25 16:31:50.182 ***
kate_send_message_to_room_1859@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-25 16:31:50.182 ***
kate_send_message_to_room_1859@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='0ec03efc13d9e7f4' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-01-25 16:31:50.182 ***
kate_send_message_to_room_1859@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-25 16:31:50.183 ***
kate_send_message_to_room_1859@localhost/res1 out
<iq type='set' id='af52399acd94e192170b8ecc989eaadc'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-01-25 16:31:50.183 ***
kate_send_message_to_room_1859@localhost/res1 in
<iq id='af52399acd94e192170b8ecc989eaadc' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>kate_send_message_to_room_1859@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-25 16:31:50.183 ***
kate_send_message_to_room_1859@localhost/res1 out
<iq type='set' id='6d7c25156eaa447c2eec7edb17555a02'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-25 16:31:50.183 ***
kate_send_message_to_room_1859@localhost/res1 in
<iq type='result' id='6d7c25156eaa447c2eec7edb17555a02'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-25 16:31:50.183 ***
kate_send_message_to_room_1859@localhost/res1 out
<presence/>



*** User 2022-01-25 16:31:50.185 ***
kate_send_message_to_room_1859@localhost/res1 in
<presence from='kate_send_message_to_room_1859@localhost/res1' to='kate_send_message_to_room_1859@localhost/res1' xml:lang='en'/>



*** User 2022-01-25 16:31:50.185 ***
alicE_send_message_to_room_1859@localhost/res1 out
<iq type='set' id='22c1a3eecc885398c3e8e6ff7199b702' to='muclight.localhost'>
	<query xmlns='urn:xmpp:muclight:0#create'>
		<configuration>
			<roomname>wonderland</roomname>
		</configuration>
		<occupants>
			<user affiliation='member'>bob_send_message_to_room_1859@localhost</user>
			<user affiliation='member'>kate_send_message_to_room_1859@localhost</user>
		</occupants>
	</query>
</iq>



*** User 2022-01-25 16:31:50.192 ***
alicE_send_message_to_room_1859@localhost/res1 in
<message from='1643-128310-186439@muclight.localhost' to='alice_send_message_to_room_1859@localhost' id='22c1a3eecc885398c3e8e6ff7199b702' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1643-128310-186429</version>
		<user affiliation='owner'>alice_send_message_to_room_1859@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-01-25 16:31:50.192 ***
alicE_send_message_to_room_1859@localhost/res1 in
<iq from='muclight.localhost' to='alicE_send_message_to_room_1859@localhost/res1' id='22c1a3eecc885398c3e8e6ff7199b702' type='result'/>



*** User 2022-01-25 16:31:50.192 ***
bOb_send_message_to_room_1859@localhost/res1 in
<message from='1643-128310-186439@muclight.localhost' to='bob_send_message_to_room_1859@localhost' id='22c1a3eecc885398c3e8e6ff7199b702' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1643-128310-186429</version>
		<user affiliation='member'>bob_send_message_to_room_1859@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-01-25 16:31:50.192 ***
kate_send_message_to_room_1859@localhost/res1 in
<message from='1643-128310-186439@muclight.localhost' to='kate_send_message_to_room_1859@localhost' id='22c1a3eecc885398c3e8e6ff7199b702' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1643-128310-186429</version>
		<user affiliation='member'>kate_send_message_to_room_1859@localhost</user>
	</x>
	<body/>
</message>



*** User 2022-01-25 16:31:50.202 ***
REST request:
Code: 204
Req: {<0.28504.1>,
      <<"/api/muc-lights/muclight.localhost/wonderland/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"062f82badce9ec8d">>}],
      <<"{\"from\":\"alicE_send_message_to_room_1859@localhost\",\"body\":\"Hello everyone!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 25 Jan 2022 16:31:50 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,8642}
Params: #{body =>
              <<"{\"from\":\"alicE_send_message_to_room_1859@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-25 16:31:50.202 ***
bOb_send_message_to_room_1859@localhost/res1 in
<message from='1643-128310-186439@muclight.localhost/alice_send_message_to_room_1859@localhost' to='bob_send_message_to_room_1859@localhost' id='1643-128310-197993' type='groupchat'>
	<body>Hello everyone!</body>
</message>



*** User 2022-01-25 16:31:50.202 ***
kate_send_message_to_room_1859@localhost/res1 in
<message from='1643-128310-186439@muclight.localhost/alice_send_message_to_room_1859@localhost' to='kate_send_message_to_room_1859@localhost' id='1643-128310-197993' type='groupchat'>
	<body>Hello everyone!</body>
</message>



*** User 2022-01-25 16:31:50.202 ***
kate_send_message_to_room_1859@localhost/res1 out
</stream:stream>

*** User 2022-01-25 16:31:50.202 ***
kate_send_message_to_room_1859@localhost/res1 in
</stream:stream>

*** User 2022-01-25 16:31:50.202 ***
bOb_send_message_to_room_1859@localhost/res1 out
</stream:stream>

*** User 2022-01-25 16:31:50.229 ***
bOb_send_message_to_room_1859@localhost/res1 in
</stream:stream>

*** User 2022-01-25 16:31:50.229 ***
alicE_send_message_to_room_1859@localhost/res1 out
</stream:stream>

*** User 2022-01-25 16:31:50.230 ***
alicE_send_message_to_room_1859@localhost/res1 in
</stream:stream>
*** CT 2022-01-25 16:31:50.233 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2339.html
*** CT 2022-01-25 16:31:50.234 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5399.html



=== Ended at 2022-01-25 16:31:50
=== successfully completed test case
=== === Returned value: ok