=== Test case: graphql_session_SUITE:domain_admin_count_sessions/1 (click for source code)

=== Config value:

    [{protocol,http},
     {domain_admin,{<<"admin@localhost">>,<<"7eb6779f729aebe7">>}},
     {schema_endpoint,domain_admin},
     {watchdog,<0.27911.0>},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {preset,"pgsql_cets"},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/graphql_session_SUITE_data"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@1c2ae12cdb1a.2023-11-17_15.10.15/big_tests.tests.graphql_session_SUITE.logs/run.2023-11-17_15.14.46/graphql_session_suite.domain_admin_count_sessions.html"},
     {tc_group_properties,[{name,domain_admin_session}]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/graphql_session_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@1c2ae12cdb1a.2023-11-17_15.10.15/big_tests.tests.graphql_session_SUITE.logs/run.2023-11-17_15.14.46/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{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_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_sic => #{iqdisc => one_queue},
        mod_presence => #{},
        mod_disco =>
            #{iqdisc => one_queue,users_can_see_hidden_services => false,
              server_info => [],extra_domains => []},
        mod_stream_management =>
            #{buffer => true,ack => true,backend => cets,
              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 => cets,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}}},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {alice_bis,[{username,<<"alicE">>},
                                 {server,<<"localhost.bis">>},
                                 {host,<<"localhost">>},
                                 {password,<<"matygrysa">>}]},
                     {bob,[{username,<<"bOb">>},
                           {server,<<"localhost">>},
                           {password,<<"makrolika">>}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@1c2ae12cdb1a.2023-11-17_15.10.15"

=== Started at 2023-11-17 15:14:57


*** CT 2023-11-17 15:14:57.353 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_1790.html

*** User 2023-11-17 15:14:57.359 ***🔗
alicE_domain_admin_count_sessions_1238@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-11-17 15:14:57.359 ***🔗
alicE_domain_admin_count_sessions_1238@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='8a20f9dd2ecc6cf4' from='localhost' version='1.0' xml:lang='en'>

*** User 2023-11-17 15:14:57.359 ***🔗
alicE_domain_admin_count_sessions_1238@localhost/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-17 15:14:57.359 ***🔗
alicE_domain_admin_count_sessions_1238@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2RvbWFpbl9hZG1pbl9jb3VudF9zZXNzaW9uc18xMjM4AG1hdHlncnlzYQ==</auth>



*** User 2023-11-17 15:14:57.360 ***🔗
alicE_domain_admin_count_sessions_1238@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2023-11-17 15:14:57.360 ***🔗
alicE_domain_admin_count_sessions_1238@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-11-17 15:14:57.360 ***🔗
alicE_domain_admin_count_sessions_1238@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='fc1c25db8fa3078e' from='localhost' version='1.0' xml:lang='en' to='alice_domain_admin_count_sessions_1238@localhost'>

*** User 2023-11-17 15:14:57.360 ***🔗
alicE_domain_admin_count_sessions_1238@localhost/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-17 15:14:57.360 ***🔗
alicE_domain_admin_count_sessions_1238@localhost/res1 out
<iq type='set' id='9635e254b8b8cef2d8c1459e8c5c7f41'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2023-11-17 15:14:57.361 ***🔗
alicE_domain_admin_count_sessions_1238@localhost/res1 in
<iq id='9635e254b8b8cef2d8c1459e8c5c7f41' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_domain_admin_count_sessions_1238@localhost/res1</jid>
	</bind>
</iq>



*** User 2023-11-17 15:14:57.361 ***🔗
alice_domain_admin_count_sessions_1238@localhost/res1 out
<iq type='set' id='a4ca7b425df7f1ab17c77570c78a3696'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-17 15:14:57.361 ***🔗
alice_domain_admin_count_sessions_1238@localhost/res1 in
<iq from='localhost' to='alice_domain_admin_count_sessions_1238@localhost/res1' id='a4ca7b425df7f1ab17c77570c78a3696' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-17 15:14:57.361 ***🔗
alice_domain_admin_count_sessions_1238@localhost/res1 out
<presence/>



*** User 2023-11-17 15:14:57.362 ***🔗
alice_domain_admin_count_sessions_1238@localhost/res1 in
<presence from='alice_domain_admin_count_sessions_1238@localhost/res1' to='alice_domain_admin_count_sessions_1238@localhost/res1'/>



*** User 2023-11-17 15:14:57.363 ***🔗
alicE_domain_admin_count_sessions_1238@localhost.bis/res1 out
<stream:stream to='localhost.bis' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-11-17 15:14:57.363 ***🔗
alicE_domain_admin_count_sessions_1238@localhost.bis/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='55adea86529e4623' from='localhost.bis' version='1.0' xml:lang='en'>

*** User 2023-11-17 15:14:57.363 ***🔗
alicE_domain_admin_count_sessions_1238@localhost.bis/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-17 15:14:57.363 ***🔗
alicE_domain_admin_count_sessions_1238@localhost.bis/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX2RvbWFpbl9hZG1pbl9jb3VudF9zZXNzaW9uc18xMjM4AG1hdHlncnlzYQ==</auth>



*** User 2023-11-17 15:14:57.364 ***🔗
alicE_domain_admin_count_sessions_1238@localhost.bis/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2023-11-17 15:14:57.364 ***🔗
alicE_domain_admin_count_sessions_1238@localhost.bis/res1 out
<stream:stream to='localhost.bis' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-11-17 15:14:57.364 ***🔗
alicE_domain_admin_count_sessions_1238@localhost.bis/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='32b49cdc0b782955' from='localhost.bis' version='1.0' xml:lang='en' to='alice_domain_admin_count_sessions_1238@localhost.bis'>

*** User 2023-11-17 15:14:57.364 ***🔗
alicE_domain_admin_count_sessions_1238@localhost.bis/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-17 15:14:57.364 ***🔗
alicE_domain_admin_count_sessions_1238@localhost.bis/res1 out
<iq type='set' id='edbde7c0e0059d0060b2f5cb907cb688'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2023-11-17 15:14:57.364 ***🔗
alicE_domain_admin_count_sessions_1238@localhost.bis/res1 in
<iq id='edbde7c0e0059d0060b2f5cb907cb688' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_domain_admin_count_sessions_1238@localhost.bis/res1</jid>
	</bind>
</iq>



*** User 2023-11-17 15:14:57.364 ***🔗
alice_domain_admin_count_sessions_1238@localhost.bis/res1 out
<iq type='set' id='6d69f088506df335a804264a68af340b'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-17 15:14:57.365 ***🔗
alice_domain_admin_count_sessions_1238@localhost.bis/res1 in
<iq from='localhost.bis' to='alice_domain_admin_count_sessions_1238@localhost.bis/res1' id='6d69f088506df335a804264a68af340b' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-17 15:14:57.365 ***🔗
alice_domain_admin_count_sessions_1238@localhost.bis/res1 out
<presence/>



*** User 2023-11-17 15:14:57.366 ***🔗
alice_domain_admin_count_sessions_1238@localhost.bis/res1 in
<presence from='alice_domain_admin_count_sessions_1238@localhost.bis/res1' to='alice_domain_admin_count_sessions_1238@localhost.bis/res1'/>



*** User 2023-11-17 15:14:57.366 ***🔗
bOb_domain_admin_count_sessions_1238@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-11-17 15:14:57.367 ***🔗
bOb_domain_admin_count_sessions_1238@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e4566cdbc40d0a74' from='localhost' version='1.0' xml:lang='en'>

*** User 2023-11-17 15:14:57.367 ***🔗
bOb_domain_admin_count_sessions_1238@localhost/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-17 15:14:57.367 ***🔗
bOb_domain_admin_count_sessions_1238@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9kb21haW5fYWRtaW5fY291bnRfc2Vzc2lvbnNfMTIzOABtYWtyb2xpa2E=</auth>



*** User 2023-11-17 15:14:57.367 ***🔗
bOb_domain_admin_count_sessions_1238@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2023-11-17 15:14:57.367 ***🔗
bOb_domain_admin_count_sessions_1238@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2023-11-17 15:14:57.368 ***🔗
bOb_domain_admin_count_sessions_1238@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='6c88f348f46a181d' from='localhost' version='1.0' xml:lang='en' to='bob_domain_admin_count_sessions_1238@localhost'>

*** User 2023-11-17 15:14:57.368 ***🔗
bOb_domain_admin_count_sessions_1238@localhost/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-17 15:14:57.368 ***🔗
bOb_domain_admin_count_sessions_1238@localhost/res1 out
<iq type='set' id='c263d0969fc9938a69c6b7b7dc7ec562'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2023-11-17 15:14:57.368 ***🔗
bOb_domain_admin_count_sessions_1238@localhost/res1 in
<iq id='c263d0969fc9938a69c6b7b7dc7ec562' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_domain_admin_count_sessions_1238@localhost/res1</jid>
	</bind>
</iq>



*** User 2023-11-17 15:14:57.368 ***🔗
bob_domain_admin_count_sessions_1238@localhost/res1 out
<iq type='set' id='b90c6853f060fb657a3caa1ee367fb17'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-17 15:14:57.368 ***🔗
bob_domain_admin_count_sessions_1238@localhost/res1 in
<iq from='localhost' to='bob_domain_admin_count_sessions_1238@localhost/res1' id='b90c6853f060fb657a3caa1ee367fb17' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2023-11-17 15:14:57.368 ***🔗
bob_domain_admin_count_sessions_1238@localhost/res1 out
<presence/>



*** User 2023-11-17 15:14:57.369 ***🔗
bob_domain_admin_count_sessions_1238@localhost/res1 in
<presence from='bob_domain_admin_count_sessions_1238@localhost/res1' to='bob_domain_admin_count_sessions_1238@localhost/res1'/>



*** User 2023-11-17 15:14:57.376 ***🔗
REST request fails:
Code: 401
Req: {<0.27970.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"7f8fd9ca96916ca0">>},
       {<<"authorization">>,
        <<"Basic YWRtaW5AbG9jYWxob3N0OjdlYjY3NzlmNzI5YWViZTc=">>}],
      <<"{\"variables\":{\"domain\":null},\"query\":\"query ($domain: DomainName) { session { countSessions(domain: $domain) } }\"}">>}
Result: {{<<"401">>,<<"Unauthorized">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 17 Nov 2023 15:14:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"206">>}],
         <<"{\"errors\":[{\"extensions\":{\"code\":\"no_permissions\"},\"path\":[\"ROOT\",\"session\",\"countSessions\"],\"message\":\"Cannot execute query ROOT without permissions to the given domain. Args with invalid value: domain\"}]}">>,
         355,5814}
Params: #{port => 5541,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          creds => {<<"admin@localhost">>,<<"7eb6779f729aebe7">>},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"domain\":null},\"query\":\"query ($domain: DomainName) { session { countSessions(domain: $domain) } }\"}">>,
          role => {graphql,domain_admin},
          return_maps => true,return_headers => true}


*** User 2023-11-17 15:14:57.388 ***🔗
REST request fails:
Code: 401
Req: {<0.27972.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"53dc85c671067aa4">>},
       {<<"authorization">>,
        <<"Basic YWRtaW5AbG9jYWxob3N0OjdlYjY3NzlmNzI5YWViZTc=">>}],
      <<"{\"variables\":{\"domain\":\"localhost.bis\"},\"query\":\"query ($domain: DomainName) { session { countSessions(domain: $domain) } }\"}">>}
Result: {{<<"401">>,<<"Unauthorized">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 17 Nov 2023 15:14:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"206">>}],
         <<"{\"errors\":[{\"extensions\":{\"code\":\"no_permissions\"},\"path\":[\"ROOT\",\"session\",\"countSessions\"],\"message\":\"Cannot execute query ROOT without permissions to the given domain. Args with invalid value: domain\"}]}">>,
         355,10951}
Params: #{port => 5541,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          creds => {<<"admin@localhost">>,<<"7eb6779f729aebe7">>},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"domain\":\"localhost.bis\"},\"query\":\"query ($domain: DomainName) { session { countSessions(domain: $domain) } }\"}">>,
          role => {graphql,domain_admin},
          return_maps => true,return_headers => true}


*** User 2023-11-17 15:14:57.395 ***🔗
REST request:
Code: 200
Req: {<0.27974.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"1fdcdf600289c441">>},
       {<<"authorization">>,
        <<"Basic YWRtaW5AbG9jYWxob3N0OjdlYjY3NzlmNzI5YWViZTc=">>}],
      <<"{\"variables\":{\"domain\":\"localhost\"},\"query\":\"query ($domain: DomainName) { session { countSessions(domain: $domain) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 17 Nov 2023 15:14:56 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"40">>}],
         <<"{\"data\":{\"session\":{\"countSessions\":2}}}">>,178,5924}
Params: #{port => 5541,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          creds => {<<"admin@localhost">>,<<"7eb6779f729aebe7">>},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"domain\":\"localhost\"},\"query\":\"query ($domain: DomainName) { session { countSessions(domain: $domain) } }\"}">>,
          role => {graphql,domain_admin},
          return_maps => true,return_headers => true}


*** User 2023-11-17 15:14:57.396 ***🔗
bob_domain_admin_count_sessions_1238@localhost/res1 out
</stream:stream>

*** User 2023-11-17 15:14:57.396 ***🔗
bob_domain_admin_count_sessions_1238@localhost/res1 in
</stream:stream>

*** User 2023-11-17 15:14:57.396 ***🔗
alice_domain_admin_count_sessions_1238@localhost.bis/res1 out
</stream:stream>

*** User 2023-11-17 15:14:57.396 ***🔗
alice_domain_admin_count_sessions_1238@localhost.bis/res1 in
</stream:stream>

*** User 2023-11-17 15:14:57.396 ***🔗
alice_domain_admin_count_sessions_1238@localhost/res1 out
</stream:stream>

*** User 2023-11-17 15:14:57.397 ***🔗
alice_domain_admin_count_sessions_1238@localhost/res1 in
</stream:stream>
*** CT 2023-11-17 15:14:57.398 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_1790.html



=== Ended at 2023-11-17 15:14:57
=== successfully completed test case
=== === Returned value: ok


Test run history | Top level test index | Latest test result