=== Test case: muc_http_api_SUITE:send_message_to_room/1 (click for source code)
=== Config value:
[{watchdog,<0.27569.1>},
{mim_data_dir,"/home/circleci/project/big_tests/tests/muc_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_http_api_SUITE.logs/run.2022-01-27_15.34.02/muc_http_api_suite.send_message_to_room.98435.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@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.muc_http_api_SUITE.logs/run.2022-01-27_15.34.02/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:02
*** User 2022-01-27 15:34:02.389 ***
alicE_send_message_to_room_1782@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:02.389 ***
alicE_send_message_to_room_1782@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='996b2d155173055d' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:34:02.389 ***
alicE_send_message_to_room_1782@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:02.389 ***
alicE_send_message_to_room_1782@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3NlbmRfbWVzc2FnZV90b19yb29tXzE3ODIAbWF0eWdyeXNh</auth>
*** User 2022-01-27 15:34:02.390 ***
alicE_send_message_to_room_1782@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 15:34:02.390 ***
alicE_send_message_to_room_1782@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:02.391 ***
alicE_send_message_to_room_1782@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='ec3ce76f10d9d8ea' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:34:02.391 ***
alicE_send_message_to_room_1782@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:02.391 ***
alicE_send_message_to_room_1782@localhost/res1 out
<iq type='set' id='f366c67f2fa5f02a0d8563d0163d06ec'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 15:34:02.391 ***
alicE_send_message_to_room_1782@localhost/res1 in
<iq id='f366c67f2fa5f02a0d8563d0163d06ec' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alicE_send_message_to_room_1782@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-27 15:34:02.391 ***
alicE_send_message_to_room_1782@localhost/res1 out
<iq type='set' id='577a1fb36f3514a473ae643ad071f472'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:34:02.392 ***
alicE_send_message_to_room_1782@localhost/res1 in
<iq type='result' id='577a1fb36f3514a473ae643ad071f472'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:34:02.392 ***
alicE_send_message_to_room_1782@localhost/res1 out
<presence/>
*** User 2022-01-27 15:34:02.394 ***
alicE_send_message_to_room_1782@localhost/res1 in
<presence from='alicE_send_message_to_room_1782@localhost/res1' to='alice_send_message_to_room_1782@localhost/res1' xml:lang='en'/>
*** User 2022-01-27 15:34:02.395 ***
bOb_send_message_to_room_1782@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:02.395 ***
bOb_send_message_to_room_1782@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f29ae02a99fb6d52' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:34:02.396 ***
bOb_send_message_to_room_1782@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:02.396 ***
bOb_send_message_to_room_1782@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9zZW5kX21lc3NhZ2VfdG9fcm9vbV8xNzgyAG1ha3JvbGlrYQ==</auth>
*** User 2022-01-27 15:34:02.397 ***
bOb_send_message_to_room_1782@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 15:34:02.397 ***
bOb_send_message_to_room_1782@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:02.397 ***
bOb_send_message_to_room_1782@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='53638d174f27e5f3' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:34:02.397 ***
bOb_send_message_to_room_1782@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:02.397 ***
bOb_send_message_to_room_1782@localhost/res1 out
<iq type='set' id='6eaf6ca046ed7b6449f84d96cb835d45'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 15:34:02.398 ***
bOb_send_message_to_room_1782@localhost/res1 in
<iq id='6eaf6ca046ed7b6449f84d96cb835d45' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb_send_message_to_room_1782@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-27 15:34:02.398 ***
bOb_send_message_to_room_1782@localhost/res1 out
<iq type='set' id='83d3380f4ed1775e87da4b97b239ec73'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:34:02.398 ***
bOb_send_message_to_room_1782@localhost/res1 in
<iq type='result' id='83d3380f4ed1775e87da4b97b239ec73'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:34:02.398 ***
bOb_send_message_to_room_1782@localhost/res1 out
<presence/>
*** User 2022-01-27 15:34:02.400 ***
bOb_send_message_to_room_1782@localhost/res1 in
<presence from='bOb_send_message_to_room_1782@localhost/res1' to='bob_send_message_to_room_1782@localhost/res1' xml:lang='en'/>
*** User 2022-01-27 15:34:02.401 ***
bOb_send_message_to_room_1782@localhost/res1 out
<presence to='wonderland-42.378609@muc.localhost/bobcat'>
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>
*** User 2022-01-27 15:34:02.402 ***
bOb_send_message_to_room_1782@localhost/res1 in
<presence from='wonderland-42.378609@muc.localhost/bobcat' to='bOb_send_message_to_room_1782@localhost/res1' xml:lang='en'>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='none' role='participant'/>
<status code='110'/>
<status code='201'/>
</x>
</presence>
*** User 2022-01-27 15:34:02.403 ***
bOb_send_message_to_room_1782@localhost/res1 in
<message from='wonderland-42.378609@muc.localhost' to='bOb_send_message_to_room_1782@localhost/res1' type='groupchat'>
<subject/>
<body/>
</message>
*** User 2022-01-27 15:34:02.404 ***
REST request:
Code: 204
Req: {<0.27641.1>,<<"/api/mucs/localhost/wonderland-42.378609/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"593bd5ca53e1831c">>}],
<<"{\"from\":\"bOb_send_message_to_room_1782@localhost\",\"body\":\"Greetings!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:34:01 GMT">>},
{<<"content-type">>,<<"application/json">>}],
<<>>,112,621}
Params: #{body =>
<<"{\"from\":\"bOb_send_message_to_room_1782@localhost\",\"body\":\"Greetings!\"}">>,
method => <<"POST">>,
path => <<"/api/mucs/localhost/wonderland-42.378609/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 15:34:02.404 ***
bOb_send_message_to_room_1782@localhost/res1 in
<message from='wonderland-42.378609@muc.localhost' to='bOb_send_message_to_room_1782@localhost' type='error'>
<body>Greetings!</body>
<error code='406' type='modify'>
<not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Only occupants are allowed to send messages to the conference</text>
</error>
</message>
*** User 2022-01-27 15:34:02.405 ***
bOb_send_message_to_room_1782@localhost/res1 out
</stream:stream>
*** User 2022-01-27 15:34:02.405 ***
bOb_send_message_to_room_1782@localhost/res1 in
</stream:stream>
*** User 2022-01-27 15:34:02.405 ***
alicE_send_message_to_room_1782@localhost/res1 out
</stream:stream>
*** User 2022-01-27 15:34:02.405 ***
alicE_send_message_to_room_1782@localhost/res1 in
</stream:stream>
=== Ended at 2022-01-27 15:34:02
=== successfully completed test case
=== === Returned value: ok