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

=== Config value:

    [{watchdog,<0.19858.0>},
     {schema_endpoint,user},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {preset,"odbc_mssql_mnesia"},
     {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@08e20f3a1f6a.2024-04-26_12.39.28/big_tests.tests.graphql_muc_SUITE.logs/run.2024-04-26_12.43.18/graphql_muc_suite.user_member_set_user_affiliation.31107.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@08e20f3a1f6a.2024-04-26_12.39.28/big_tests.tests.graphql_muc_SUITE.logs/run.2024-04-26_12.43.18/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_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}}},
     {{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_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@08e20f3a1f6a.2024-04-26_12.39.28"

=== Started at 2024-04-26 12:43:19


*** CT 2024-04-26 12:43:19.074 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_1518.html

*** User 2024-04-26 12:43:19.239 ***🔗
alicE_user_member_set_user_affiliation_870@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-26 12:43:19.240 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='5e66afa764757b42' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-26 12:43:19.240 ***🔗
alicE_user_member_set_user_affiliation_870@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-26 12:43:19.240 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg3MABtYXR5Z3J5c2E=</auth>



*** User 2024-04-26 12:43:19.241 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-26 12:43:19.241 ***🔗
alicE_user_member_set_user_affiliation_870@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-26 12:43:19.242 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='824b1083dc5c865d' from='localhost' version='1.0' xml:lang='en' to='alice_user_member_set_user_affiliation_870@localhost'>

*** User 2024-04-26 12:43:19.242 ***🔗
alicE_user_member_set_user_affiliation_870@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-26 12:43:19.242 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 out
<iq type='set' id='95ed156a9670b0d290581eae209a27d5'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-26 12:43:19.242 ***🔗
alicE_user_member_set_user_affiliation_870@localhost/res1 in
<iq id='95ed156a9670b0d290581eae209a27d5' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_user_member_set_user_affiliation_870@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-26 12:43:19.308 ***🔗
alice_user_member_set_user_affiliation_870@localhost/res1 out
<iq type='set' id='93bfe013b3117953541d2582b90d9a90'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-26 12:43:19.309 ***🔗
alice_user_member_set_user_affiliation_870@localhost/res1 in
<iq from='localhost' to='alice_user_member_set_user_affiliation_870@localhost/res1' id='93bfe013b3117953541d2582b90d9a90' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-26 12:43:19.309 ***🔗
alice_user_member_set_user_affiliation_870@localhost/res1 out
<presence/>



*** User 2024-04-26 12:43:19.310 ***🔗
alice_user_member_set_user_affiliation_870@localhost/res1 in
<presence from='alice_user_member_set_user_affiliation_870@localhost/res1' to='alice_user_member_set_user_affiliation_870@localhost/res1'/>



*** User 2024-04-26 12:43:19.311 ***🔗
bOb_user_member_set_user_affiliation_870@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-26 12:43:19.311 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='a0ae7ee416053955' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-26 12:43:19.311 ***🔗
bOb_user_member_set_user_affiliation_870@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-26 12:43:19.312 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl91c2VyX21lbWJlcl9zZXRfdXNlcl9hZmZpbGlhdGlvbl84NzAAbWFrcm9saWth</auth>



*** User 2024-04-26 12:43:19.312 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-26 12:43:19.312 ***🔗
bOb_user_member_set_user_affiliation_870@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-26 12:43:19.313 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f845f92e7c5f7bb1' from='localhost' version='1.0' xml:lang='en' to='bob_user_member_set_user_affiliation_870@localhost'>

*** User 2024-04-26 12:43:19.313 ***🔗
bOb_user_member_set_user_affiliation_870@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-26 12:43:19.313 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 out
<iq type='set' id='dc98a3a3d785fa4e37cb1505ff2e8afc'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-26 12:43:19.313 ***🔗
bOb_user_member_set_user_affiliation_870@localhost/res1 in
<iq id='dc98a3a3d785fa4e37cb1505ff2e8afc' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_user_member_set_user_affiliation_870@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-26 12:43:19.313 ***🔗
bob_user_member_set_user_affiliation_870@localhost/res1 out
<iq type='set' id='ad70ea55b46895f0b7acee438bb4a185'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-26 12:43:19.314 ***🔗
bob_user_member_set_user_affiliation_870@localhost/res1 in
<iq from='localhost' to='bob_user_member_set_user_affiliation_870@localhost/res1' id='ad70ea55b46895f0b7acee438bb4a185' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-26 12:43:19.314 ***🔗
bob_user_member_set_user_affiliation_870@localhost/res1 out
<presence/>



*** User 2024-04-26 12:43:19.315 ***🔗
bob_user_member_set_user_affiliation_870@localhost/res1 in
<presence from='bob_user_member_set_user_affiliation_870@localhost/res1' to='bob_user_member_set_user_affiliation_870@localhost/res1'/>



*** User 2024-04-26 12:43:19.316 ***🔗
kate_user_member_set_user_affiliation_870@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-26 12:43:19.316 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='5069ca432be5ccdc' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-26 12:43:19.317 ***🔗
kate_user_member_set_user_affiliation_870@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-26 12:43:19.317 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODcwAG1ha3Jvd2U7cA==</auth>



*** User 2024-04-26 12:43:19.318 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-26 12:43:19.318 ***🔗
kate_user_member_set_user_affiliation_870@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-26 12:43:19.318 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3f7b9a048c736b75' from='localhost' version='1.0' xml:lang='en' to='kate_user_member_set_user_affiliation_870@localhost'>

*** User 2024-04-26 12:43:19.318 ***🔗
kate_user_member_set_user_affiliation_870@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-26 12:43:19.318 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 out
<iq type='set' id='d7650abb1aac044a7dec13585c5f73cf'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-26 12:43:19.318 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
<iq id='d7650abb1aac044a7dec13585c5f73cf' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>kate_user_member_set_user_affiliation_870@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-26 12:43:19.319 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 out
<iq type='set' id='d4f73d4190c3e1aa356cc77e2a63f327'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-26 12:43:19.320 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
<iq from='localhost' to='kate_user_member_set_user_affiliation_870@localhost/res1' id='d4f73d4190c3e1aa356cc77e2a63f327' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-26 12:43:19.321 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 out
<presence/>



*** User 2024-04-26 12:43:19.322 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
<presence from='kate_user_member_set_user_affiliation_870@localhost/res1' to='kate_user_member_set_user_affiliation_870@localhost/res1'/>


Could not find element wait_for_parallel_writer in Config.


*** User 2024-04-26 12:43:19.352 ***🔗
REST request:
Code: 200
Req: {<0.20453.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"f3103e7b028e0339">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODcwQGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"bob_user_member_set_user_affiliation_870@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">>,<<"Fri, 26 Apr 2024 12:43:18 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"70">>}],
         <<"{\"data\":{\"muc\":{\"setUserAffiliation\":\"Affiliation set successfully\"}}}">>,
         208,28817}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"bob_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          return_maps => true,
          role => {graphql,user},
          creds =>
              {<<"alice_user_member_set_user_affiliation_870@localhost">>,
               <<"matygrysa">>},
          return_headers => true}


*** User 2024-04-26 12:43:19.411 ***🔗
REST request:
Code: 200
Req: {<0.20511.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"7e1d7bb18982b074">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@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">>,<<"Fri, 26 Apr 2024 12:43:18 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_870@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         417,1638}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          return_maps => true,
          role => {graphql,user},
          creds =>
              {<<"bob_user_member_set_user_affiliation_870@localhost">>,
               <<"makrolika">>},
          return_headers => true}


*** User 2024-04-26 12:43:19.413 ***🔗
REST request:
Code: 200
Req: {<0.20513.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"a5128f3e7c1c04af">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"ADMIN\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@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">>,<<"Fri, 26 Apr 2024 12:43:18 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_870@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         416,1536}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"affiliation\":\"ADMIN\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          return_maps => true,
          role => {graphql,user},
          creds =>
              {<<"bob_user_member_set_user_affiliation_870@localhost">>,
               <<"makrolika">>},
          return_headers => true}


*** User 2024-04-26 12:43:19.416 ***🔗
REST request:
Code: 200
Req: {<0.20520.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ff074e8de49f4308">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"OWNER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@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">>,<<"Fri, 26 Apr 2024 12:43:18 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_870@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         416,1486}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"affiliation\":\"OWNER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          return_maps => true,
          role => {graphql,user},
          creds =>
              {<<"bob_user_member_set_user_affiliation_870@localhost">>,
               <<"makrolika">>},
          return_headers => true}


*** User 2024-04-26 12:43:19.418 ***🔗
REST request:
Code: 200
Req: {<0.20526.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"3d79b82409759af2">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODcwQGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@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">>,<<"Fri, 26 Apr 2024 12:43:18 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"70">>}],
         <<"{\"data\":{\"muc\":{\"setUserAffiliation\":\"Affiliation set successfully\"}}}">>,
         208,1437}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          return_maps => true,
          role => {graphql,user},
          creds =>
              {<<"alice_user_member_set_user_affiliation_870@localhost">>,
               <<"matygrysa">>},
          return_headers => true}


*** User 2024-04-26 12:43:19.420 ***🔗
REST request:
Code: 200
Req: {<0.20528.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ce5ac0e8d4424515">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg3MEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"NONE\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@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">>,<<"Fri, 26 Apr 2024 12:43:18 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_870@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         415,1263}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          method => <<"POST">>,
          body =>
              <<"{\"variables\":{\"affiliation\":\"NONE\",\"room\":\"room-alice_user_member_set_user_affiliation_870@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_870@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          return_maps => true,
          role => {graphql,user},
          creds =>
              {<<"bob_user_member_set_user_affiliation_870@localhost">>,
               <<"makrolika">>},
          return_headers => true}


*** User 2024-04-26 12:43:19.421 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 out
</stream:stream>

*** User 2024-04-26 12:43:19.421 ***🔗
kate_user_member_set_user_affiliation_870@localhost/res1 in
</stream:stream>

*** User 2024-04-26 12:43:19.421 ***🔗
bob_user_member_set_user_affiliation_870@localhost/res1 out
</stream:stream>

*** User 2024-04-26 12:43:19.421 ***🔗
bob_user_member_set_user_affiliation_870@localhost/res1 in
</stream:stream>

*** User 2024-04-26 12:43:19.421 ***🔗
alice_user_member_set_user_affiliation_870@localhost/res1 out
</stream:stream>

*** User 2024-04-26 12:43:19.422 ***🔗
alice_user_member_set_user_affiliation_870@localhost/res1 in
</stream:stream>

*** User 2024-04-26 12:43:19.422 ***🔗
waiting for room_archive_size is done in 0 miliseconds
*** CT 2024-04-26 12:43:19.424 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_1520.html



=== Ended at 2024-04-26 12:43:19
=== successfully completed test case
=== === Returned value: ok