=== Test case: rest_SUITE:session_can_be_kicked/1 (click for source code)

=== Config value:

    [{watchdog,<0.8353.2>},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {mam_backend,rdbms},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_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.rest_SUITE.logs/run.2022-01-27_15.36.47/rest_suite.session_can_be_kicked.147330.html"},
     {tc_group_properties,[{name,admin},parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/rest_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.rest_SUITE.logs/run.2022-01-27_15.36.47/log_private/"},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {bob,[{username,<<"bOb">>},
                           {server,<<"localhost">>},
                           {password,<<"makrolika">>}]}]}]

=== 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:36:47


*** CT 2022-01-27 15:36:47.938 *** View log from node mongooseim@localhost when started mongooseim@localhost_5698.html
*** CT 2022-01-27 15:36:47.939 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2385.html

*** User 2022-01-27 15:36:47.966 ***
alicE_session_can_be_kicked_2141@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:36:47.970 ***
alicE_session_can_be_kicked_2141@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='4fd3053e421e871a' from='localhost' version='1.0' xml:lang='en'>

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



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



*** User 2022-01-27 15:36:47.972 ***
alicE_session_can_be_kicked_2141@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:36:47.972 ***
alicE_session_can_be_kicked_2141@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3199de55aae90bca' from='localhost' version='1.0' xml:lang='en'>

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



*** User 2022-01-27 15:36:47.974 ***
alicE_session_can_be_kicked_2141@localhost/res1 in
<iq id='d52de01ad9050d9b6f403472daef10f3' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_session_can_be_kicked_2141@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-01-27 15:36:47.974 ***
alicE_session_can_be_kicked_2141@localhost/res1 out
<iq type='set' id='10ca9ce93e1e8dc48021873de66a163c'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:36:47.975 ***
alicE_session_can_be_kicked_2141@localhost/res1 in
<iq type='result' id='10ca9ce93e1e8dc48021873de66a163c'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-01-27 15:36:47.976 ***
alicE_session_can_be_kicked_2141@localhost/res1 out
<presence/>



*** User 2022-01-27 15:36:47.979 ***
alicE_session_can_be_kicked_2141@localhost/res1 in
<presence from='alicE_session_can_be_kicked_2141@localhost/res1' to='alice_session_can_be_kicked_2141@localhost/res1' xml:lang='en'/>



*** User 2022-01-27 15:36:47.989 ***
REST request:
Code: 200
Req: {<0.8536.2>,<<"/api/sessions/localhost">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"47959446816746c1">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:36:47 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"274">>}],
         <<"[\"alice_messages_are_sent_and_received_2142@localhost/res1\",\"alice_stanzas_are_sent_and_received_2143@localhost/res1\",\"alice_session_can_be_kicked_2141@localhost/res1\",\"alice_messages_error_handling_2144@localhost/res1\",\"alice_messages_can_be_paginated_2145@localhost/res1\"]">>,
         399,526}
Params: #{body => <<>>,method => <<"GET">>,
          path => <<"/api/sessions/localhost">>,return_headers => true,
          role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:36:47.991 ***
REST request:
Code: 204
Req: {<0.8553.2>,
      <<"/api/sessions/localhost/alicE_session_can_be_kicked_2141/res1">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"637552413dc0832b">>}],
      <<>>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:36:47 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,657}
Params: #{body => <<>>,method => <<"DELETE">>,
          path =>
              <<"/api/sessions/localhost/alicE_session_can_be_kicked_2141/res1">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:36:47.991 ***
alicE_session_can_be_kicked_2141@localhost/res1 in
<stream:error>
	<conflict xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>
	<text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-streams'>kicked</text>
</stream:error>



*** User 2022-01-27 15:36:47.994 ***
REST request:
Code: 200
Req: {<0.8558.2>,<<"/api/sessions/localhost">>,<<"GET">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4c4d54e6844a8034">>}],
      <<>>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:36:47 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"354">>}],
         <<"[\"alice_messages_are_sent_and_received_2142@localhost/res1\",\"alice@localhost/res1\",\"alice_messages_are_archived_2146@localhost/res1\",\"alice_stanzas_are_sent_and_received_2143@localhost/res1\",\"alice_messages_error_handling_2144@localhost/res1\",\"alice_messages_can_be_paginated_2145@localhost/res1\",\"bob_messages_are_sent_and_received_2142@localhost/res1\"]">>,
         479,528}
Params: #{body => <<>>,method => <<"GET">>,
          path => <<"/api/sessions/localhost">>,return_headers => true,
          role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-01-27 15:36:47.996 ***
REST request fails:
Code: 404
Req: {<0.8562.2>,
      <<"/api/sessions/localhost/alicE_session_can_be_kicked_2141/res1">>,
      <<"DELETE">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"22b1efc67223465f">>}],
      <<>>}
Result: {{<<"404">>,<<"Not Found">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Thu, 27 Jan 2022 15:36:47 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"17">>}],
         <<"no active session">>,148,1177}
Params: #{body => <<>>,method => <<"DELETE">>,
          path =>
              <<"/api/sessions/localhost/alicE_session_can_be_kicked_2141/res1">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}

*** CT 2022-01-27 15:36:47.999 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2385.html
*** CT 2022-01-27 15:36:48.000 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5699.html



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