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

=== Config value:

    [{watchdog,<0.19462.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@b1facb53901b.2024-04-30_06.47.40/big_tests.tests.graphql_muc_SUITE.logs/run.2024-04-30_06.50.43/graphql_muc_suite.user_member_set_user_affiliation.36355.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@b1facb53901b.2024-04-30_06.47.40/big_tests.tests.graphql_muc_SUITE.logs/run.2024-04-30_06.50.43/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_amp => #{},
        mod_sic => #{iqdisc => one_queue},
        mod_disco =>
            #{iqdisc => one_queue,server_info => [],extra_domains => [],
              users_can_see_hidden_services => false},
        mod_presence => #{},
        mod_stream_management =>
            #{buffer => true,ack => true,backend => cets,buffer_max => 100,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              ack_freq => 1,resume_timeout => 600},
        mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        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_amp => #{},
        mod_sic => #{iqdisc => one_queue},
        mod_disco =>
            #{iqdisc => one_queue,server_info => [],extra_domains => [],
              users_can_see_hidden_services => false},
        mod_presence => #{},
        mod_stream_management =>
            #{buffer => true,ack => true,backend => cets,buffer_max => 100,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              ack_freq => 1,resume_timeout => 600},
        mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        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@b1facb53901b.2024-04-30_06.47.40"

=== Started at 2024-04-30 06:50:43


*** CT 2024-04-30 06:50:43.671 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_1419.html

*** User 2024-04-30 06:50:43.839 ***🔗
alicE_user_member_set_user_affiliation_857@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-30 06:50:43.840 ***🔗
alicE_user_member_set_user_affiliation_857@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='eb40c8a67c63a0b9' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-30 06:50:43.840 ***🔗
alicE_user_member_set_user_affiliation_857@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-30 06:50:43.841 ***🔗
alicE_user_member_set_user_affiliation_857@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg1NwBtYXR5Z3J5c2E=</auth>



*** User 2024-04-30 06:50:43.842 ***🔗
alicE_user_member_set_user_affiliation_857@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-30 06:50:43.842 ***🔗
alicE_user_member_set_user_affiliation_857@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-30 06:50:43.843 ***🔗
alicE_user_member_set_user_affiliation_857@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='8ca4b6a59fe5a1cf' from='localhost' version='1.0' xml:lang='en' to='alice_user_member_set_user_affiliation_857@localhost'>

*** User 2024-04-30 06:50:43.843 ***🔗
alicE_user_member_set_user_affiliation_857@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-30 06:50:43.844 ***🔗
alicE_user_member_set_user_affiliation_857@localhost/res1 out
<iq type='set' id='f518391d57f7cfe170c5a1d24609511c'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-30 06:50:43.844 ***🔗
alicE_user_member_set_user_affiliation_857@localhost/res1 in
<iq id='f518391d57f7cfe170c5a1d24609511c' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_user_member_set_user_affiliation_857@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-30 06:50:43.844 ***🔗
alice_user_member_set_user_affiliation_857@localhost/res1 out
<iq type='set' id='5c620f16b171dc3f068e9991ea02e0a5'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-30 06:50:43.846 ***🔗
alice_user_member_set_user_affiliation_857@localhost/res1 in
<iq from='localhost' to='alice_user_member_set_user_affiliation_857@localhost/res1' id='5c620f16b171dc3f068e9991ea02e0a5' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-30 06:50:43.847 ***🔗
alice_user_member_set_user_affiliation_857@localhost/res1 out
<presence/>



*** User 2024-04-30 06:50:43.849 ***🔗
alice_user_member_set_user_affiliation_857@localhost/res1 in
<presence from='alice_user_member_set_user_affiliation_857@localhost/res1' to='alice_user_member_set_user_affiliation_857@localhost/res1'/>



*** User 2024-04-30 06:50:43.850 ***🔗
bOb_user_member_set_user_affiliation_857@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-30 06:50:43.851 ***🔗
bOb_user_member_set_user_affiliation_857@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='6408881d9282cc3e' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-30 06:50:43.851 ***🔗
bOb_user_member_set_user_affiliation_857@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-30 06:50:43.852 ***🔗
bOb_user_member_set_user_affiliation_857@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl91c2VyX21lbWJlcl9zZXRfdXNlcl9hZmZpbGlhdGlvbl84NTcAbWFrcm9saWth</auth>



*** User 2024-04-30 06:50:43.853 ***🔗
bOb_user_member_set_user_affiliation_857@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-30 06:50:43.853 ***🔗
bOb_user_member_set_user_affiliation_857@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-30 06:50:43.853 ***🔗
bOb_user_member_set_user_affiliation_857@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='f2ef2c9592dc66ec' from='localhost' version='1.0' xml:lang='en' to='bob_user_member_set_user_affiliation_857@localhost'>

*** User 2024-04-30 06:50:43.854 ***🔗
bOb_user_member_set_user_affiliation_857@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-30 06:50:43.854 ***🔗
bOb_user_member_set_user_affiliation_857@localhost/res1 out
<iq type='set' id='8ccc8dad44708f9c06690bb146adfdd4'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-30 06:50:43.854 ***🔗
bOb_user_member_set_user_affiliation_857@localhost/res1 in
<iq id='8ccc8dad44708f9c06690bb146adfdd4' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_user_member_set_user_affiliation_857@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-30 06:50:43.854 ***🔗
bob_user_member_set_user_affiliation_857@localhost/res1 out
<iq type='set' id='18ebce87106a74502cf3ddbd089c9a4c'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-30 06:50:43.855 ***🔗
bob_user_member_set_user_affiliation_857@localhost/res1 in
<iq from='localhost' to='bob_user_member_set_user_affiliation_857@localhost/res1' id='18ebce87106a74502cf3ddbd089c9a4c' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-30 06:50:43.856 ***🔗
bob_user_member_set_user_affiliation_857@localhost/res1 out
<presence/>



*** User 2024-04-30 06:50:43.857 ***🔗
bob_user_member_set_user_affiliation_857@localhost/res1 in
<presence from='bob_user_member_set_user_affiliation_857@localhost/res1' to='bob_user_member_set_user_affiliation_857@localhost/res1'/>



*** User 2024-04-30 06:50:43.858 ***🔗
kate_user_member_set_user_affiliation_857@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-30 06:50:43.858 ***🔗
kate_user_member_set_user_affiliation_857@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='8a18517edcf29930' from='localhost' version='1.0' xml:lang='en'>

*** User 2024-04-30 06:50:43.858 ***🔗
kate_user_member_set_user_affiliation_857@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-30 06:50:43.858 ***🔗
kate_user_member_set_user_affiliation_857@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODU3AG1ha3Jvd2U7cA==</auth>



*** User 2024-04-30 06:50:43.860 ***🔗
kate_user_member_set_user_affiliation_857@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-30 06:50:43.860 ***🔗
kate_user_member_set_user_affiliation_857@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-30 06:50:43.861 ***🔗
kate_user_member_set_user_affiliation_857@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d3a05c65b9b205d8' from='localhost' version='1.0' xml:lang='en' to='kate_user_member_set_user_affiliation_857@localhost'>

*** User 2024-04-30 06:50:43.861 ***🔗
kate_user_member_set_user_affiliation_857@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-30 06:50:43.861 ***🔗
kate_user_member_set_user_affiliation_857@localhost/res1 out
<iq type='set' id='3fe7a01b01fbe5f1cb1b0e4760cff3ea'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-30 06:50:43.862 ***🔗
kate_user_member_set_user_affiliation_857@localhost/res1 in
<iq id='3fe7a01b01fbe5f1cb1b0e4760cff3ea' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>kate_user_member_set_user_affiliation_857@localhost/res1</jid>
	</bind>
</iq>



*** User 2024-04-30 06:50:43.862 ***🔗
kate_user_member_set_user_affiliation_857@localhost/res1 out
<iq type='set' id='4ed1e8a2bcccd6bfee0db833ca5cfc7a'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-30 06:50:43.862 ***🔗
kate_user_member_set_user_affiliation_857@localhost/res1 in
<iq from='localhost' to='kate_user_member_set_user_affiliation_857@localhost/res1' id='4ed1e8a2bcccd6bfee0db833ca5cfc7a' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-30 06:50:43.863 ***🔗
kate_user_member_set_user_affiliation_857@localhost/res1 out
<presence/>



*** User 2024-04-30 06:50:43.864 ***🔗
kate_user_member_set_user_affiliation_857@localhost/res1 in
<presence from='kate_user_member_set_user_affiliation_857@localhost/res1' to='kate_user_member_set_user_affiliation_857@localhost/res1'/>



*** User 2024-04-30 06:50:43.866 ***🔗
REST request:
Code: 200
Req: {<0.20040.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"9d99e4d45bd5ec17">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODU3QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_857@muc.localhost\",\"user\":\"bob_user_member_set_user_affiliation_857@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">>,<<"Tue, 30 Apr 2024 06:50:43 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"70">>}],
         <<"{\"data\":{\"muc\":{\"setUserAffiliation\":\"Affiliation set successfully\"}}}">>,
         208,1059}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_857@muc.localhost\",\"user\":\"bob_user_member_set_user_affiliation_857@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          role => {graphql,user},
          method => <<"POST">>,
          creds =>
              {<<"alice_user_member_set_user_affiliation_857@localhost">>,
               <<"matygrysa">>},
          return_maps => true,return_headers => true}


*** User 2024-04-30 06:50:43.869 ***🔗
REST request:
Code: 200
Req: {<0.20049.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"b3ff691aebd4f8ad">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg1N0Bsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_857@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_857@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">>,<<"Tue, 30 Apr 2024 06:50:43 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_857@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         417,1457}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_857@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_857@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          role => {graphql,user},
          method => <<"POST">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_857@localhost">>,
               <<"makrolika">>},
          return_maps => true,return_headers => true}


*** User 2024-04-30 06:50:43.871 ***🔗
REST request:
Code: 200
Req: {<0.20062.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ed7f27d53ffc4fcb">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg1N0Bsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"ADMIN\",\"room\":\"room-alice_user_member_set_user_affiliation_857@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_857@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">>,<<"Tue, 30 Apr 2024 06:50:43 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_857@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         416,1397}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"variables\":{\"affiliation\":\"ADMIN\",\"room\":\"room-alice_user_member_set_user_affiliation_857@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_857@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          role => {graphql,user},
          method => <<"POST">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_857@localhost">>,
               <<"makrolika">>},
          return_maps => true,return_headers => true}


*** User 2024-04-30 06:50:43.874 ***🔗
REST request:
Code: 200
Req: {<0.20076.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"5165218b2fbd94e6">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg1N0Bsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"OWNER\",\"room\":\"room-alice_user_member_set_user_affiliation_857@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_857@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">>,<<"Tue, 30 Apr 2024 06:50:43 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_857@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         416,1056}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"variables\":{\"affiliation\":\"OWNER\",\"room\":\"room-alice_user_member_set_user_affiliation_857@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_857@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          role => {graphql,user},
          method => <<"POST">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_857@localhost">>,
               <<"makrolika">>},
          return_maps => true,return_headers => true}


*** User 2024-04-30 06:50:43.936 ***🔗
REST request:
Code: 200
Req: {<0.20084.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"2735e0b6078d0387">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODU3QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_857@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_857@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">>,<<"Tue, 30 Apr 2024 06:50:43 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"70">>}],
         <<"{\"data\":{\"muc\":{\"setUserAffiliation\":\"Affiliation set successfully\"}}}">>,
         208,61281}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_857@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_857@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          role => {graphql,user},
          method => <<"POST">>,
          creds =>
              {<<"alice_user_member_set_user_affiliation_857@localhost">>,
               <<"matygrysa">>},
          return_maps => true,return_headers => true}


*** User 2024-04-30 06:50:43.939 ***🔗
REST request:
Code: 200
Req: {<0.20091.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"504641a2dfa0cb92">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg1N0Bsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"NONE\",\"room\":\"room-alice_user_member_set_user_affiliation_857@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_857@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">>,<<"Tue, 30 Apr 2024 06:50:43 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_857@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         415,1505}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          body =>
              <<"{\"variables\":{\"affiliation\":\"NONE\",\"room\":\"room-alice_user_member_set_user_affiliation_857@muc.localhost\",\"user\":\"kate_user_member_set_user_affiliation_857@localhost\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          role => {graphql,user},
          method => <<"POST">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_857@localhost">>,
               <<"makrolika">>},
          return_maps => true,return_headers => true}


*** User 2024-04-30 06:50:43.940 ***🔗
kate_user_member_set_user_affiliation_857@localhost/res1 out
</stream:stream>

*** User 2024-04-30 06:50:43.940 ***🔗
kate_user_member_set_user_affiliation_857@localhost/res1 in
</stream:stream>

*** User 2024-04-30 06:50:43.940 ***🔗
bob_user_member_set_user_affiliation_857@localhost/res1 out
</stream:stream>

*** User 2024-04-30 06:50:43.940 ***🔗
bob_user_member_set_user_affiliation_857@localhost/res1 in
</stream:stream>

*** User 2024-04-30 06:50:43.940 ***🔗
alice_user_member_set_user_affiliation_857@localhost/res1 out
</stream:stream>

*** User 2024-04-30 06:50:43.941 ***🔗
alice_user_member_set_user_affiliation_857@localhost/res1 in
</stream:stream>
*** CT 2024-04-30 06:50:43.952 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_1421.html



=== Ended at 2024-04-30 06:50:44
=== successfully completed test case
=== === Returned value: ok