=== Test case: graphql_muc_SUITE:user_moderator_set_user_role/1 (click for source code)
=== Config value:
[{watchdog,<0.19559.0>},
{schema_endpoint,user},
{{ejabberd_cwd,mongooseim@localhost},
"/home/circleci/project/_build/mim1/rel/mongooseim"},
{preset,"pgsql_cets"},
{mim_data_dir,"/home/circleci/project/big_tests/tests/graphql_muc_SUITE_data"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@f9d3eab3b59f.2024-04-22_17.28.49/big_tests.tests.graphql_muc_SUITE.logs/run.2024-04-22_17.32.06/graphql_muc_suite.user_moderator_set_user_role.40706.html"},
{tc_group_properties,[{name,user_muc_configured},parallel]},
{tc_group_path,[[{name,user}]]},
{data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/graphql_muc_SUITE_data/"},
{priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@f9d3eab3b59f.2024-04-22_17.28.49/big_tests.tests.graphql_muc_SUITE.logs/run.2024-04-22_17.32.06/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_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_amp => #{},mod_presence => #{},
mod_disco =>
#{server_info => [],iqdisc => one_queue,extra_domains => [],
users_can_see_hidden_services => false},
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 =>
#{inactivity => 30,max_pause => 120,max_wait => infinity,
server_acks => false,backend => cets},
mod_cache_users =>
#{strategy => fifo,number_of_segments => 5,time_to_live => 2},
mod_carboncopy => #{iqdisc => no_queue}}},
{{saved_modules,mongooseim@localhost,<<"localhost.bis">>},
#{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_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_amp => #{},mod_presence => #{},
mod_disco =>
#{server_info => [],iqdisc => one_queue,extra_domains => [],
users_can_see_hidden_services => false},
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 =>
#{inactivity => 30,max_pause => 120,max_wait => infinity,
server_acks => false,backend => cets},
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@f9d3eab3b59f.2024-04-22_17.28.49"
=== Started at 2024-04-22 17:32:06
*** User 2024-04-22 17:32:06.870 ***🔗
alicE_user_moderator_set_user_role_877@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2024-04-22 17:32:06.872 ***🔗
alicE_user_moderator_set_user_role_877@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='adda0f21c02aa34b' from='localhost' version='1.0' xml:lang='en'>
*** User 2024-04-22 17:32:06.872 ***🔗
alicE_user_moderator_set_user_role_877@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 2024-04-22 17:32:06.872 ***🔗
alicE_user_moderator_set_user_role_877@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3VzZXJfbW9kZXJhdG9yX3NldF91c2VyX3JvbGVfODc3AG1hdHlncnlzYQ==</auth>
*** User 2024-04-22 17:32:06.873 ***🔗
alicE_user_moderator_set_user_role_877@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2024-04-22 17:32:06.873 ***🔗
alicE_user_moderator_set_user_role_877@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2024-04-22 17:32:06.874 ***🔗
alicE_user_moderator_set_user_role_877@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='944bcd69f081475b' from='localhost' version='1.0' xml:lang='en' to='alice_user_moderator_set_user_role_877@localhost'>
*** User 2024-04-22 17:32:06.875 ***🔗
alicE_user_moderator_set_user_role_877@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 2024-04-22 17:32:06.875 ***🔗
alicE_user_moderator_set_user_role_877@localhost/res1 out
<iq type='set' id='fc18f7b3563cdb213632d43f22fc38a6'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2024-04-22 17:32:06.876 ***🔗
alicE_user_moderator_set_user_role_877@localhost/res1 in
<iq id='fc18f7b3563cdb213632d43f22fc38a6' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alice_user_moderator_set_user_role_877@localhost/res1</jid>
</bind>
</iq>
*** User 2024-04-22 17:32:06.877 ***🔗
alice_user_moderator_set_user_role_877@localhost/res1 out
<iq type='set' id='c141183a36beb7fe69d161562484b409'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-22 17:32:06.878 ***🔗
alice_user_moderator_set_user_role_877@localhost/res1 in
<iq from='localhost' to='alice_user_moderator_set_user_role_877@localhost/res1' id='c141183a36beb7fe69d161562484b409' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-22 17:32:06.879 ***🔗
alice_user_moderator_set_user_role_877@localhost/res1 out
<presence/>
*** User 2024-04-22 17:32:06.883 ***🔗
alice_user_moderator_set_user_role_877@localhost/res1 in
<presence from='alice_user_moderator_set_user_role_877@localhost/res1' to='alice_user_moderator_set_user_role_877@localhost/res1'/>
*** User 2024-04-22 17:32:06.886 ***🔗
bOb_user_moderator_set_user_role_877@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2024-04-22 17:32:06.887 ***🔗
bOb_user_moderator_set_user_role_877@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='a2ef8ec8f13356b4' from='localhost' version='1.0' xml:lang='en'>
*** User 2024-04-22 17:32:06.888 ***🔗
bOb_user_moderator_set_user_role_877@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 2024-04-22 17:32:06.888 ***🔗
bOb_user_moderator_set_user_role_877@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl91c2VyX21vZGVyYXRvcl9zZXRfdXNlcl9yb2xlXzg3NwBtYWtyb2xpa2E=</auth>
*** User 2024-04-22 17:32:06.890 ***🔗
bOb_user_moderator_set_user_role_877@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2024-04-22 17:32:06.891 ***🔗
bOb_user_moderator_set_user_role_877@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2024-04-22 17:32:06.892 ***🔗
bOb_user_moderator_set_user_role_877@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c102b2830d82f319' from='localhost' version='1.0' xml:lang='en' to='bob_user_moderator_set_user_role_877@localhost'>
*** User 2024-04-22 17:32:06.892 ***🔗
bOb_user_moderator_set_user_role_877@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 2024-04-22 17:32:06.893 ***🔗
bOb_user_moderator_set_user_role_877@localhost/res1 out
<iq type='set' id='8d4e3b227933584eec8302d0f9cabb52'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2024-04-22 17:32:06.894 ***🔗
bOb_user_moderator_set_user_role_877@localhost/res1 in
<iq id='8d4e3b227933584eec8302d0f9cabb52' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bob_user_moderator_set_user_role_877@localhost/res1</jid>
</bind>
</iq>
*** User 2024-04-22 17:32:06.894 ***🔗
bob_user_moderator_set_user_role_877@localhost/res1 out
<iq type='set' id='475482ed3a2c98577b35405182355ee4'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-22 17:32:06.896 ***🔗
bob_user_moderator_set_user_role_877@localhost/res1 in
<iq from='localhost' to='bob_user_moderator_set_user_role_877@localhost/res1' id='475482ed3a2c98577b35405182355ee4' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-04-22 17:32:06.896 ***🔗
bob_user_moderator_set_user_role_877@localhost/res1 out
<presence/>
*** User 2024-04-22 17:32:06.899 ***🔗
bob_user_moderator_set_user_role_877@localhost/res1 in
<presence from='bob_user_moderator_set_user_role_877@localhost/res1' to='bob_user_moderator_set_user_role_877@localhost/res1'/>
*** User 2024-04-22 17:32:06.900 ***🔗
alice_user_moderator_set_user_role_877@localhost/res1 out
<presence to='room-alice_user_moderator_set_user_role_877@muc.localhost/alice_user_moderator_set_user_role_877'>
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>
*** User 2024-04-22 17:32:06.903 ***🔗
alice_user_moderator_set_user_role_877@localhost/res1 in
<presence from='room-alice_user_moderator_set_user_role_877@muc.localhost/alice_user_moderator_set_user_role_877' to='alice_user_moderator_set_user_role_877@localhost/res1'>
<x xmlns='http://jabber.org/protocol/muc'>
<item jid='alice_user_moderator_set_user_role_877@localhost/res1' affiliation='owner' role='moderator'/>
<status code='110'/>
<status code='100'/>
<status code='201'/>
</x>
</presence>
*** User 2024-04-22 17:32:06.903 ***🔗
bob_user_moderator_set_user_role_877@localhost/res1 out
<presence to='room-alice_user_moderator_set_user_role_877@muc.localhost/Boobek'>
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>
*** User 2024-04-22 17:32:06.905 ***🔗
bob_user_moderator_set_user_role_877@localhost/res1 in
<presence from='room-alice_user_moderator_set_user_role_877@muc.localhost/alice_user_moderator_set_user_role_877' to='bob_user_moderator_set_user_role_877@localhost/res1'>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item jid='alice_user_moderator_set_user_role_877@localhost/res1' affiliation='owner' role='moderator'/>
</x>
</presence>
*** User 2024-04-22 17:32:06.975 ***🔗
REST request:
Code: 200
Req: {<0.20128.0>,<<"/api/graphql">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"368e354d9fce1ce2">>},
{<<"authorization">>,
<<"Basic YWxpY2VfdXNlcl9tb2RlcmF0b3Jfc2V0X3VzZXJfcm9sZV84NzdAbG9jYWxob3N0Om1hdHlncnlzYQ==">>}],
<<"{\"query\":\"mutation ($nick: ResourceName!, $role: MUCRole!, $room: BareJID!) { muc { setUserRole(nick: $nick, role: $role, room: $room) } }\",\"variables\":{\"role\":\"VISITOR\",\"nick\":\"Boobek\",\"room\":\"room-alice_user_moderator_set_user_role_877@muc.localhost\"}}">>}
Result: {{<<"200">>,<<"OK">>},
[{<<"vary">>,<<"accept">>},
{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Mon, 22 Apr 2024 17:32:06 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"56">>}],
<<"{\"data\":{\"muc\":{\"setUserRole\":\"Role set successfully\"}}}">>,
194,15401}
Params: #{port => 5561,path => <<"/api/graphql">>,
server => #{node => mongooseim@localhost},
body =>
<<"{\"query\":\"mutation ($nick: ResourceName!, $role: MUCRole!, $room: BareJID!) { muc { setUserRole(nick: $nick, role: $role, room: $room) } }\",\"variables\":{\"role\":\"VISITOR\",\"nick\":\"Boobek\",\"room\":\"room-alice_user_moderator_set_user_role_877@muc.localhost\"}}">>,
role => {graphql,user},
method => <<"POST">>,return_maps => true,
creds =>
{<<"alice_user_moderator_set_user_role_877@localhost">>,
<<"matygrysa">>},
return_headers => true}
*** User 2024-04-22 17:32:06.988 ***🔗
REST request:
Code: 200
Req: {<0.20176.0>,<<"/api/graphql">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"5ea9a7af8fc88171">>},
{<<"authorization">>,
<<"Basic YWxpY2VfdXNlcl9tb2RlcmF0b3Jfc2V0X3VzZXJfcm9sZV84NzdAbG9jYWxob3N0Om1hdHlncnlzYQ==">>}],
<<"{\"query\":\"mutation ($nick: ResourceName!, $role: MUCRole!, $room: BareJID!) { muc { setUserRole(nick: $nick, role: $role, room: $room) } }\",\"variables\":{\"role\":\"PARTICIPANT\",\"nick\":\"Boobek\",\"room\":\"room-alice_user_moderator_set_user_role_877@muc.localhost\"}}">>}
Result: {{<<"200">>,<<"OK">>},
[{<<"vary">>,<<"accept">>},
{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Mon, 22 Apr 2024 17:32:06 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"56">>}],
<<"{\"data\":{\"muc\":{\"setUserRole\":\"Role set successfully\"}}}">>,
194,10993}
Params: #{port => 5561,path => <<"/api/graphql">>,
server => #{node => mongooseim@localhost},
body =>
<<"{\"query\":\"mutation ($nick: ResourceName!, $role: MUCRole!, $room: BareJID!) { muc { setUserRole(nick: $nick, role: $role, room: $room) } }\",\"variables\":{\"role\":\"PARTICIPANT\",\"nick\":\"Boobek\",\"room\":\"room-alice_user_moderator_set_user_role_877@muc.localhost\"}}">>,
role => {graphql,user},
method => <<"POST">>,return_maps => true,
creds =>
{<<"alice_user_moderator_set_user_role_877@localhost">>,
<<"matygrysa">>},
return_headers => true}
*** User 2024-04-22 17:32:07.000 ***🔗
REST request:
Code: 200
Req: {<0.20209.0>,<<"/api/graphql">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"4d9d195713704aae">>},
{<<"authorization">>,
<<"Basic YWxpY2VfdXNlcl9tb2RlcmF0b3Jfc2V0X3VzZXJfcm9sZV84NzdAbG9jYWxob3N0Om1hdHlncnlzYQ==">>}],
<<"{\"query\":\"mutation ($nick: ResourceName!, $role: MUCRole!, $room: BareJID!) { muc { setUserRole(nick: $nick, role: $role, room: $room) } }\",\"variables\":{\"role\":\"MODERATOR\",\"nick\":\"Boobek\",\"room\":\"room-alice_user_moderator_set_user_role_877@muc.localhost\"}}">>}
Result: {{<<"200">>,<<"OK">>},
[{<<"vary">>,<<"accept">>},
{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Mon, 22 Apr 2024 17:32:06 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"56">>}],
<<"{\"data\":{\"muc\":{\"setUserRole\":\"Role set successfully\"}}}">>,
194,8580}
Params: #{port => 5561,path => <<"/api/graphql">>,
server => #{node => mongooseim@localhost},
body =>
<<"{\"query\":\"mutation ($nick: ResourceName!, $role: MUCRole!, $room: BareJID!) { muc { setUserRole(nick: $nick, role: $role, room: $room) } }\",\"variables\":{\"role\":\"MODERATOR\",\"nick\":\"Boobek\",\"room\":\"room-alice_user_moderator_set_user_role_877@muc.localhost\"}}">>,
role => {graphql,user},
method => <<"POST">>,return_maps => true,
creds =>
{<<"alice_user_moderator_set_user_role_877@localhost">>,
<<"matygrysa">>},
return_headers => true}
*** User 2024-04-22 17:32:07.001 ***🔗
bob_user_moderator_set_user_role_877@localhost/res1 out
</stream:stream>
*** User 2024-04-22 17:32:07.001 ***🔗
bob_user_moderator_set_user_role_877@localhost/res1 in
</stream:stream>
*** User 2024-04-22 17:32:07.001 ***🔗
alice_user_moderator_set_user_role_877@localhost/res1 out
</stream:stream>
*** User 2024-04-22 17:32:07.002 ***🔗
alice_user_moderator_set_user_role_877@localhost/res1 in
</stream:stream>
=== Ended at 2024-04-22 17:32:07
=== successfully completed test case
=== === Returned value: ok