=== Test case: rest_client_SUITE:msg_is_sent_and_delivered_in_room/1 (click for source code)

=== Config value:

    [{watchdog,<0.71679.0>},
     {muc_light_host,<<"muclight.domain.example.com">>},
     {mam_backend,rdbms},
     {preset,"pgsql_mnesia"},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_client_SUITE_data"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@a2fc54846062.2023-11-14_11.38.11/big_tests.tests.rest_client_SUITE.logs/run.2023-11-14_11.54.34/rest_client_suite.msg_is_sent_and_delivered_in_room.121988.html"},
     {tc_group_properties,[{name,muc},parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/rest_client_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@a2fc54846062.2023-11-14_11.38.11/big_tests.tests.rest_client_SUITE.logs/run.2023-11-14_11.54.34/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"test type">>},
      #{mod_vcard =>
            #{matches => 30,
              host => {prefix,<<"vjud.">>},
              search => true,backend => rdbms,iqdisc => parallel},
        mod_roster =>
            #{backend => rdbms,iqdisc => one_queue,versioning => false,
              store_current_id => false},
        mod_amp => #{},
        mod_sic => #{iqdisc => one_queue},
        mod_register =>
            #{access => register,iqdisc => one_queue,
              registration_watchers => [],password_strength => 0,
              ip_access => [{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}]},
        mod_disco =>
            #{iqdisc => one_queue,users_can_see_hidden_services => false,
              server_info => [],extra_domains => []},
        mod_presence => #{},
        mod_stream_management =>
            #{buffer => true,ack => true,backend => mnesia,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              buffer_max => 100,ack_freq => 1,resume_timeout => 600},
        mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        mod_bosh =>
            #{backend => mnesia,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false},
        mod_cache_users =>
            #{strategy => fifo,number_of_segments => 5,time_to_live => 2},
        mod_carboncopy => #{iqdisc => no_queue}}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@a2fc54846062.2023-11-14_11.38.11"

=== Started at 2023-11-14 11:54:35


*** CT 2023-11-14 11:54:35.157 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_2586.html

*** User 2023-11-14 11:54:35.205 ***🔗
alicE_msg_is_sent_and_delivered_in_room_3258@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 2023-11-14 11:54:35.205 ***🔗
alicE_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b72eb2788aea57d0' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2023-11-14 11:54:35.206 ***🔗
alicE_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<stream:features>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2023-11-14 11:54:35.206 ***🔗
alicE_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21zZ19pc19zZW50X2FuZF9kZWxpdmVyZWRfaW5fcm9vbV8zMjU4AG1hdHlncnlzYQ==</auth>



*** User 2023-11-14 11:54:35.208 ***🔗
alicE_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2023-11-14 11:54:35.208 ***🔗
alicE_msg_is_sent_and_delivered_in_room_3258@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 2023-11-14 11:54:35.209 ***🔗
alicE_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1dbe29fad9d1f3f2' from='domain.example.com' version='1.0' xml:lang='en' to='alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com'>

*** User 2023-11-14 11:54:35.209 ***🔗
alicE_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<stream:features>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2023-11-14 11:54:35.210 ***🔗
alicE_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 out
<iq type='set' id='d12fc5bfdc0017ccbf11b55b6857e76e'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2023-11-14 11:54:35.211 ***🔗
alicE_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<iq id='d12fc5bfdc0017ccbf11b55b6857e76e' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2023-11-14 11:54:35.211 ***🔗
alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 out
<iq type='set' id='aa9ec70689cc74d0e648e6f366abf798'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-14 11:54:35.213 ***🔗
alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<iq from='domain.example.com' to='alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1' id='aa9ec70689cc74d0e648e6f366abf798' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-14 11:54:35.213 ***🔗
alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 out
<presence/>



*** User 2023-11-14 11:54:35.267 ***🔗
alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<presence from='alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1' to='alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1'/>



*** User 2023-11-14 11:54:35.269 ***🔗
bOb_msg_is_sent_and_delivered_in_room_3258@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 2023-11-14 11:54:35.270 ***🔗
bOb_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3b0b8ff87c96f8a6' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2023-11-14 11:54:35.270 ***🔗
bOb_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<stream:features>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2023-11-14 11:54:35.270 ***🔗
bOb_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tc2dfaXNfc2VudF9hbmRfZGVsaXZlcmVkX2luX3Jvb21fMzI1OABtYWtyb2xpa2E=</auth>



*** User 2023-11-14 11:54:35.309 ***🔗
bOb_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2023-11-14 11:54:35.309 ***🔗
bOb_msg_is_sent_and_delivered_in_room_3258@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 2023-11-14 11:54:35.310 ***🔗
bOb_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='6a9b8eeca751cc9e' from='domain.example.com' version='1.0' xml:lang='en' to='bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com'>

*** User 2023-11-14 11:54:35.311 ***🔗
bOb_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<stream:features>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2023-11-14 11:54:35.311 ***🔗
bOb_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 out
<iq type='set' id='b16839a668c380ddc33166d7097436e9'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2023-11-14 11:54:35.369 ***🔗
bOb_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<iq id='b16839a668c380ddc33166d7097436e9' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2023-11-14 11:54:35.369 ***🔗
bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 out
<iq type='set' id='099b5e4a8eee7bfcfeb61706e0d39fbc'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-14 11:54:35.370 ***🔗
bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<iq from='domain.example.com' to='bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1' id='099b5e4a8eee7bfcfeb61706e0d39fbc' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-14 11:54:35.370 ***🔗
bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 out
<presence/>



*** User 2023-11-14 11:54:35.381 ***🔗
bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<presence from='bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1' to='bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1'/>



*** User 2023-11-14 11:54:35.402 ***🔗
REST request:
Code: 201
Req: {<0.72247.0>,<<"/api/rooms">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d1d3d17169f2535d">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfbXNnX2lzX3NlbnRfYW5kX2RlbGl2ZXJlZF9pbl9yb29tXzMyNThAZG9tYWluLmV4YW1wbGUuY29tOm1hdHlncnlzYQ==">>}],
      <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 14 Nov 2023 11:54:34 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"27">>}],
         <<"{\"id\":\"1699-962875-395276\"}">>,156,11218}
Params: #{path => <<"/api/rooms">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>,
          method => <<"POST">>,
          creds =>
              {<<"alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com">>,
               <<"matygrysa">>},
          role => client,return_headers => true}


*** User 2023-11-14 11:54:35.489 ***🔗
REST request:
Code: 204
Req: {<0.72324.0>,<<"/api/rooms/1699-962875-395276/users">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"0b1c5b42048beed9">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfbXNnX2lzX3NlbnRfYW5kX2RlbGl2ZXJlZF9pbl9yb29tXzMyNThAZG9tYWluLmV4YW1wbGUuY29tOm1hdHlncnlzYQ==">>}],
      <<"{\"user\":\"bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 14 Nov 2023 11:54:34 GMT">>}],
         <<>>,80,79532}
Params: #{path => <<"/api/rooms/1699-962875-395276/users">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"user\":\"bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com\"}">>,
          method => <<"POST">>,
          creds =>
              {<<"alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com">>,
               <<"matygrysa">>},
          role => client,return_headers => true}


*** User 2023-11-14 11:54:35.489 ***🔗
bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<message from='1699-962875-395276@muclight.domain.example.com' to='bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com' id='fc98f25c-a196-42f5-a13b-242495eb19ec' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<version>1699-962875-476126</version>
		<user affiliation='member'>bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com</user>
	</x>
	<body/>
</message>



*** User 2023-11-14 11:54:35.489 ***🔗
alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<message from='1699-962875-395276@muclight.domain.example.com' to='alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com' id='fc98f25c-a196-42f5-a13b-242495eb19ec' type='groupchat'>
	<x xmlns='urn:xmpp:muclight:0#affiliations'>
		<prev-version>1699-962875-395266</prev-version>
		<version>1699-962875-476126</version>
		<user affiliation='member'>bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com</user>
	</x>
	<body/>
	<stanza-id by='1699-962875-395276@muclight.domain.example.com' id='C2GRED9FK2O1' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2023-11-14 11:54:35.504 ***🔗
REST request:
Code: 200
Req: {<0.72458.0>,<<"/api/rooms/1699-962875-395276/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"0116aeec0982d5c8">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfbXNnX2lzX3NlbnRfYW5kX2RlbGl2ZXJlZF9pbl9yb29tXzMyNThAZG9tYWluLmV4YW1wbGUuY29tOm1hdHlncnlzYQ==">>}],
      <<"{\"body\":\"Hi all!\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 14 Nov 2023 11:54:34 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"45">>}],
         <<"{\"id\":\"941771b2-328d-44e2-922a-c337fd4c20ae\"}">>,169,9039}
Params: #{path => <<"/api/rooms/1699-962875-395276/messages">>,
          server => #{node => mongooseim@localhost},
          body => <<"{\"body\":\"Hi all!\"}">>,method => <<"POST">>,
          creds =>
              {<<"alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com">>,
               <<"matygrysa">>},
          role => client,return_headers => true}


*** User 2023-11-14 11:54:35.578 ***🔗
REST request:
Code: 200
Req: {<0.72496.0>,<<"/api/rooms/1699-962875-395276/messages">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"d04a8602d1213132">>},
       {<<"authorization">>,
        <<"Basic Ym9iX21zZ19pc19zZW50X2FuZF9kZWxpdmVyZWRfaW5fcm9vbV8zMjU4QGRvbWFpbi5leGFtcGxlLmNvbTptYWtyb2xpa2E=">>}],
      <<"{\"body\":\"Hi all!\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Tue, 14 Nov 2023 11:54:34 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"45">>}],
         <<"{\"id\":\"d2b552da-d85d-4ee7-a961-5cadb23e8706\"}">>,169,9758}
Params: #{path => <<"/api/rooms/1699-962875-395276/messages">>,
          server => #{node => mongooseim@localhost},
          body => <<"{\"body\":\"Hi all!\"}">>,method => <<"POST">>,
          creds =>
              {<<"bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com">>,
               <<"makrolika">>},
          role => client,return_headers => true}


*** User 2023-11-14 11:54:35.579 ***🔗
alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<message from='1699-962875-395276@muclight.domain.example.com/alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com' to='alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com' id='941771b2-328d-44e2-922a-c337fd4c20ae' type='groupchat'>
	<body>Hi all!</body>
	<stanza-id by='1699-962875-395276@muclight.domain.example.com' id='C2GRED9L0701' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2023-11-14 11:54:35.580 ***🔗
bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<message from='1699-962875-395276@muclight.domain.example.com/alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com' to='bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com' id='941771b2-328d-44e2-922a-c337fd4c20ae' type='groupchat'>
	<body>Hi all!</body>
	<stanza-id by='1699-962875-395276@muclight.domain.example.com' id='C2GRED9L0701' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2023-11-14 11:54:35.580 ***🔗
alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<message from='1699-962875-395276@muclight.domain.example.com/bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com' to='alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com' id='d2b552da-d85d-4ee7-a961-5cadb23e8706' type='groupchat'>
	<body>Hi all!</body>
	<stanza-id by='1699-962875-395276@muclight.domain.example.com' id='C2GREDA739G1' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2023-11-14 11:54:35.580 ***🔗
bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
<message from='1699-962875-395276@muclight.domain.example.com/bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com' to='bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com' id='d2b552da-d85d-4ee7-a961-5cadb23e8706' type='groupchat'>
	<body>Hi all!</body>
	<stanza-id by='1699-962875-395276@muclight.domain.example.com' id='C2GREDA739G1' xmlns='urn:xmpp:sid:0'/>
</message>



*** User 2023-11-14 11:54:35.580 ***🔗
bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 out
</stream:stream>

*** User 2023-11-14 11:54:35.581 ***🔗
bob_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
</stream:stream>

*** User 2023-11-14 11:54:35.581 ***🔗
alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 out
</stream:stream>

*** User 2023-11-14 11:54:35.583 ***🔗
alice_msg_is_sent_and_delivered_in_room_3258@domain.example.com/res1 in
</stream:stream>
*** CT 2023-11-14 11:54:35.585 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_2587.html



=== Ended at 2023-11-14 11:54:35
=== successfully completed test case
=== === Returned value: ok