=== Test case: graphql_muc_SUITE:user_member_set_user_affiliation/1 (click for source code)

=== Config value:

    [{watchdog,<0.19555.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@bde445ecd7e8.2024-04-10_12.44.04/big_tests.tests.graphql_muc_SUITE.logs/run.2024-04-10_12.47.05/graphql_muc_suite.user_member_set_user_affiliation.47874.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@bde445ecd7e8.2024-04-10_12.44.04/big_tests.tests.graphql_muc_SUITE.logs/run.2024-04-10_12.47.05/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{mod_vcard =>
            #{matches => 30,
              host => {prefix,<<"vjud.">>},
              search => true,iqdisc => parallel,backend => rdbms},
        mod_roster =>
            #{iqdisc => one_queue,backend => rdbms,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 =>
            #{iqdisc => one_queue,users_can_see_hidden_services => false,
              server_info => [],extra_domains => []},
        mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        mod_stream_management =>
            #{buffer => true,ack => true,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              backend => cets,buffer_max => 100,ack_freq => 1,
              resume_timeout => 600},
        mod_cache_users =>
            #{strategy => fifo,number_of_segments => 5,time_to_live => 2},
        mod_bosh =>
            #{backend => cets,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false},
        mod_carboncopy => #{iqdisc => no_queue}}},
     {{saved_modules,mongooseim@localhost,<<"localhost.bis">>},
      #{mod_vcard =>
            #{matches => 30,
              host => {prefix,<<"vjud.">>},
              search => true,iqdisc => parallel,backend => rdbms},
        mod_roster =>
            #{iqdisc => one_queue,backend => rdbms,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 =>
            #{iqdisc => one_queue,users_can_see_hidden_services => false,
              server_info => [],extra_domains => []},
        mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        mod_stream_management =>
            #{buffer => true,ack => true,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              backend => cets,buffer_max => 100,ack_freq => 1,
              resume_timeout => 600},
        mod_cache_users =>
            #{strategy => fifo,number_of_segments => 5,time_to_live => 2},
        mod_bosh =>
            #{backend => cets,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false},
        mod_carboncopy => #{iqdisc => no_queue}}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@bde445ecd7e8.2024-04-10_12.44.04"

=== Started at 2024-04-10 12:47:06


*** CT 2024-04-10 12:47:06.259 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_1397.html
Could not find element wait_for_parallel_writer in Config.


*** User 2024-04-10 12:47:06.365 ***🔗
alicE_user_member_set_user_affiliation_852@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-10 12:47:06.366 ***🔗
alicE_user_member_set_user_affiliation_852@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f6976d13472491bf' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-10 12:47:06.366 ***🔗
alicE_user_member_set_user_affiliation_852@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-10 12:47:06.367 ***🔗
alicE_user_member_set_user_affiliation_852@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg1MgBtYXR5Z3J5c2E=</auth>



*** User 2024-04-10 12:47:06.368 ***🔗
alicE_user_member_set_user_affiliation_852@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-10 12:47:06.368 ***🔗
alicE_user_member_set_user_affiliation_852@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-10 12:47:06.369 ***🔗
alicE_user_member_set_user_affiliation_852@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3abd8d2ed6752078' from='localhost' version='1.0' xml:lang='en' to='alice_user_member_set_user_affiliation_852@localhost'>

*** User 2024-04-10 12:47:06.369 ***🔗
alicE_user_member_set_user_affiliation_852@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-10 12:47:06.369 ***🔗
alicE_user_member_set_user_affiliation_852@localhost/res1 out
<iq type='set' id='71d386fd9558a0e1092c9ac8bc158f08'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-10 12:47:06.370 ***🔗
alicE_user_member_set_user_affiliation_852@localhost/res1 in
<iq id='71d386fd9558a0e1092c9ac8bc158f08' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_user_member_set_user_affiliation_852@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-10 12:47:06.370 ***🔗
alice_user_member_set_user_affiliation_852@localhost/res1 out
<iq type='set' id='32e44f436bd8a842d82407f0f623b9ce'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-10 12:47:06.371 ***🔗
alice_user_member_set_user_affiliation_852@localhost/res1 in
<iq from='localhost' to='alice_user_member_set_user_affiliation_852@localhost/res1' id='32e44f436bd8a842d82407f0f623b9ce' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-10 12:47:06.371 ***🔗
alice_user_member_set_user_affiliation_852@localhost/res1 out
<presence/>



*** User 2024-04-10 12:47:06.373 ***🔗
alice_user_member_set_user_affiliation_852@localhost/res1 in
<presence from='alice_user_member_set_user_affiliation_852@localhost/res1' to='alice_user_member_set_user_affiliation_852@localhost/res1'/>



*** User 2024-04-10 12:47:06.374 ***🔗
bOb_user_member_set_user_affiliation_852@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-10 12:47:06.374 ***🔗
bOb_user_member_set_user_affiliation_852@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='cbaebe142da90420' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-10 12:47:06.374 ***🔗
bOb_user_member_set_user_affiliation_852@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-10 12:47:06.374 ***🔗
bOb_user_member_set_user_affiliation_852@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl91c2VyX21lbWJlcl9zZXRfdXNlcl9hZmZpbGlhdGlvbl84NTIAbWFrcm9saWth</auth>



*** User 2024-04-10 12:47:06.375 ***🔗
bOb_user_member_set_user_affiliation_852@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-10 12:47:06.375 ***🔗
bOb_user_member_set_user_affiliation_852@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-10 12:47:06.376 ***🔗
bOb_user_member_set_user_affiliation_852@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='00e0385d8d24f698' from='localhost' version='1.0' xml:lang='en' to='bob_user_member_set_user_affiliation_852@localhost'>

*** User 2024-04-10 12:47:06.376 ***🔗
bOb_user_member_set_user_affiliation_852@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-10 12:47:06.376 ***🔗
bOb_user_member_set_user_affiliation_852@localhost/res1 out
<iq type='set' id='f05e1735d9a9cfa49ef42c426012c03c'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-10 12:47:06.377 ***🔗
bOb_user_member_set_user_affiliation_852@localhost/res1 in
<iq id='f05e1735d9a9cfa49ef42c426012c03c' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_user_member_set_user_affiliation_852@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-10 12:47:06.377 ***🔗
bob_user_member_set_user_affiliation_852@localhost/res1 out
<iq type='set' id='bd46fe17362acaad5e693a32ae5a8032'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-10 12:47:06.378 ***🔗
bob_user_member_set_user_affiliation_852@localhost/res1 in
<iq from='localhost' to='bob_user_member_set_user_affiliation_852@localhost/res1' id='bd46fe17362acaad5e693a32ae5a8032' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-10 12:47:06.378 ***🔗
bob_user_member_set_user_affiliation_852@localhost/res1 out
<presence/>



*** User 2024-04-10 12:47:06.379 ***🔗
bob_user_member_set_user_affiliation_852@localhost/res1 in
<presence from='bob_user_member_set_user_affiliation_852@localhost/res1' to='bob_user_member_set_user_affiliation_852@localhost/res1'/>



*** User 2024-04-10 12:47:06.380 ***🔗
kate_user_member_set_user_affiliation_852@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-10 12:47:06.380 ***🔗
kate_user_member_set_user_affiliation_852@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='cb233db11fa18a89' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-10 12:47:06.380 ***🔗
kate_user_member_set_user_affiliation_852@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-10 12:47:06.380 ***🔗
kate_user_member_set_user_affiliation_852@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODUyAG1ha3Jvd2U7cA==</auth>



*** User 2024-04-10 12:47:06.442 ***🔗
kate_user_member_set_user_affiliation_852@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-10 12:47:06.442 ***🔗
kate_user_member_set_user_affiliation_852@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-10 12:47:06.442 ***🔗
kate_user_member_set_user_affiliation_852@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='55966de72a19d950' from='localhost' version='1.0' xml:lang='en' to='kate_user_member_set_user_affiliation_852@localhost'>

*** User 2024-04-10 12:47:06.442 ***🔗
kate_user_member_set_user_affiliation_852@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-10 12:47:06.442 ***🔗
kate_user_member_set_user_affiliation_852@localhost/res1 out
<iq type='set' id='b33c5e1739c9bc7c58b0e3bac08defb9'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-10 12:47:06.443 ***🔗
kate_user_member_set_user_affiliation_852@localhost/res1 in
<iq id='b33c5e1739c9bc7c58b0e3bac08defb9' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>kate_user_member_set_user_affiliation_852@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-10 12:47:06.443 ***🔗
kate_user_member_set_user_affiliation_852@localhost/res1 out
<iq type='set' id='cb8c4dc9ab9b9c3690ae2c7181529ecb'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-10 12:47:06.443 ***🔗
kate_user_member_set_user_affiliation_852@localhost/res1 in
<iq from='localhost' to='kate_user_member_set_user_affiliation_852@localhost/res1' id='cb8c4dc9ab9b9c3690ae2c7181529ecb' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-10 12:47:06.444 ***🔗
kate_user_member_set_user_affiliation_852@localhost/res1 out
<presence/>



*** User 2024-04-10 12:47:06.445 ***🔗
kate_user_member_set_user_affiliation_852@localhost/res1 in
<presence from='kate_user_member_set_user_affiliation_852@localhost/res1' to='kate_user_member_set_user_affiliation_852@localhost/res1'/>



*** User 2024-04-10 12:47:06.447 ***🔗
REST request:
Code: 200
Req: {<0.20136.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"add5923a7856efbc">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODUyQGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<"{\"variables\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"affiliation\":\"MEMBER\",\"user\":\"bob_user_member_set_user_affiliation_852@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 10 Apr 2024 12:47:05 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"70">>}],
         <<"{\"data\":{\"muc\":{\"setUserAffiliation\":\"Affiliation set successfully\"}}}">>,
         208,1166}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          creds =>
              {<<"alice_user_member_set_user_affiliation_852@localhost">>,
               <<"matygrysa">>},
          role => {graphql,user},
          body =>
              <<"{\"variables\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"affiliation\":\"MEMBER\",\"user\":\"bob_user_member_set_user_affiliation_852@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          return_maps => true,return_headers => true}


*** User 2024-04-10 12:47:06.450 ***🔗
REST request:
Code: 200
Req: {<0.20148.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"351a909065a9ddab">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg1MkBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"affiliation\":\"MEMBER\",\"user\":\"kate_user_member_set_user_affiliation_852@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 10 Apr 2024 12:47:05 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"278">>}],
         <<"{\"errors\":[{\"path\":[\"muc\",\"setUserAffiliation\"],\"message\":\"Given user does not have permission to set the member affiliation\",\"extensions\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         417,1177}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_852@localhost">>,
               <<"makrolika">>},
          role => {graphql,user},
          body =>
              <<"{\"variables\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"affiliation\":\"MEMBER\",\"user\":\"kate_user_member_set_user_affiliation_852@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          return_maps => true,return_headers => true}


*** User 2024-04-10 12:47:06.452 ***🔗
REST request:
Code: 200
Req: {<0.20154.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"a0ba47c66977a4a4">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg1MkBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"affiliation\":\"ADMIN\",\"user\":\"kate_user_member_set_user_affiliation_852@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 10 Apr 2024 12:47:05 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"277">>}],
         <<"{\"errors\":[{\"path\":[\"muc\",\"setUserAffiliation\"],\"message\":\"Given user does not have permission to set the admin affiliation\",\"extensions\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         416,990}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_852@localhost">>,
               <<"makrolika">>},
          role => {graphql,user},
          body =>
              <<"{\"variables\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"affiliation\":\"ADMIN\",\"user\":\"kate_user_member_set_user_affiliation_852@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          return_maps => true,return_headers => true}


*** User 2024-04-10 12:47:06.454 ***🔗
REST request:
Code: 200
Req: {<0.20164.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"c4c001e3a61a95de">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg1MkBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"affiliation\":\"OWNER\",\"user\":\"kate_user_member_set_user_affiliation_852@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 10 Apr 2024 12:47:05 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"277">>}],
         <<"{\"errors\":[{\"path\":[\"muc\",\"setUserAffiliation\"],\"message\":\"Given user does not have permission to set the owner affiliation\",\"extensions\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         416,918}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_852@localhost">>,
               <<"makrolika">>},
          role => {graphql,user},
          body =>
              <<"{\"variables\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"affiliation\":\"OWNER\",\"user\":\"kate_user_member_set_user_affiliation_852@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          return_maps => true,return_headers => true}


*** User 2024-04-10 12:47:06.456 ***🔗
REST request:
Code: 200
Req: {<0.20170.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ba331ae85baafa7e">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODUyQGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<"{\"variables\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"affiliation\":\"MEMBER\",\"user\":\"kate_user_member_set_user_affiliation_852@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 10 Apr 2024 12:47:05 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"70">>}],
         <<"{\"data\":{\"muc\":{\"setUserAffiliation\":\"Affiliation set successfully\"}}}">>,
         208,1014}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          creds =>
              {<<"alice_user_member_set_user_affiliation_852@localhost">>,
               <<"matygrysa">>},
          role => {graphql,user},
          body =>
              <<"{\"variables\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"affiliation\":\"MEMBER\",\"user\":\"kate_user_member_set_user_affiliation_852@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          return_maps => true,return_headers => true}


*** User 2024-04-10 12:47:06.458 ***🔗
REST request:
Code: 200
Req: {<0.20177.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"2b53b555c81b10d0">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg1MkBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"affiliation\":\"NONE\",\"user\":\"kate_user_member_set_user_affiliation_852@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 10 Apr 2024 12:47:05 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"276">>}],
         <<"{\"errors\":[{\"path\":[\"muc\",\"setUserAffiliation\"],\"message\":\"Given user does not have permission to set the none affiliation\",\"extensions\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         415,1052}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_852@localhost">>,
               <<"makrolika">>},
          role => {graphql,user},
          body =>
              <<"{\"variables\":{\"room\":\"room-alice_user_member_set_user_affiliation_852@muc.localhost\",\"affiliation\":\"NONE\",\"user\":\"kate_user_member_set_user_affiliation_852@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          return_maps => true,return_headers => true}


*** User 2024-04-10 12:47:06.458 ***🔗
kate_user_member_set_user_affiliation_852@localhost/res1 out
</stream:stream>

*** User 2024-04-10 12:47:06.458 ***🔗
kate_user_member_set_user_affiliation_852@localhost/res1 in
</stream:stream>

*** User 2024-04-10 12:47:06.458 ***🔗
bob_user_member_set_user_affiliation_852@localhost/res1 out
</stream:stream>

*** User 2024-04-10 12:47:06.459 ***🔗
bob_user_member_set_user_affiliation_852@localhost/res1 in
</stream:stream>

*** User 2024-04-10 12:47:06.459 ***🔗
alice_user_member_set_user_affiliation_852@localhost/res1 out
</stream:stream>

*** User 2024-04-10 12:47:06.459 ***🔗
alice_user_member_set_user_affiliation_852@localhost/res1 in
</stream:stream>

*** User 2024-04-10 12:47:06.460 ***🔗
waiting for room_archive_size is done in 0 miliseconds
*** CT 2024-04-10 12:47:06.475 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_1399.html



=== Ended at 2024-04-10 12:47:06
=== successfully completed test case
=== === Returned value: ok