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

=== Config value:

    [{watchdog,<0.19706.0>},
     {schema_endpoint,user},
     {{ejabberd_cwd,mongooseim@localhost},
      "/home/circleci/project/_build/mim1/rel/mongooseim"},
     {preset,"pgsql_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@ea7194d6e7a9.2024-04-15_20.13.03/big_tests.tests.graphql_muc_SUITE.logs/run.2024-04-15_20.16.34/graphql_muc_suite.user_member_set_user_affiliation.25219.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@ea7194d6e7a9.2024-04-15_20.13.03/big_tests.tests.graphql_muc_SUITE.logs/run.2024-04-15_20.16.34/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"test type">>},
      #{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_disco =>
            #{iqdisc => one_queue,server_info => [],extra_domains => [],
              users_can_see_hidden_services => false},
        mod_presence => #{},
        mod_stream_management =>
            #{buffer => true,ack => true,
              stale_h =>
                  #{enabled => false,repeat_after => 1800,geriatric => 3600},
              backend => mnesia,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@ea7194d6e7a9.2024-04-15_20.13.03"

=== Started at 2024-04-15 20:16:34


*** CT 2024-04-15 20:16:35.037 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_1486.html
Could not find element wait_for_parallel_writer in Config.


*** User 2024-04-15 20:16:35.210 ***🔗
alicE_user_member_set_user_affiliation_869@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-15 20:16:35.211 ***🔗
alicE_user_member_set_user_affiliation_869@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='777e733c141c5e7d' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2024-04-15 20:16:35.211 ***🔗
alicE_user_member_set_user_affiliation_869@domain.example.com/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-15 20:16:35.211 ***🔗
alicE_user_member_set_user_affiliation_869@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg2OQBtYXR5Z3J5c2E=</auth>



*** User 2024-04-15 20:16:35.213 ***🔗
alicE_user_member_set_user_affiliation_869@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-15 20:16:35.213 ***🔗
alicE_user_member_set_user_affiliation_869@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-15 20:16:35.214 ***🔗
alicE_user_member_set_user_affiliation_869@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='2491a36a86d0b47a' from='domain.example.com' version='1.0' xml:lang='en' to='alice_user_member_set_user_affiliation_869@domain.example.com'>

*** User 2024-04-15 20:16:35.215 ***🔗
alicE_user_member_set_user_affiliation_869@domain.example.com/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-15 20:16:35.215 ***🔗
alicE_user_member_set_user_affiliation_869@domain.example.com/res1 out
<iq type='set' id='9d2f70b6586b4906fa900aad5a78efa4'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-15 20:16:35.216 ***🔗
alicE_user_member_set_user_affiliation_869@domain.example.com/res1 in
<iq id='9d2f70b6586b4906fa900aad5a78efa4' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_user_member_set_user_affiliation_869@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2024-04-15 20:16:35.216 ***🔗
alice_user_member_set_user_affiliation_869@domain.example.com/res1 out
<iq type='set' id='389a8e1c17b68ae0072c2c957bdf05ce'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-15 20:16:35.217 ***🔗
alice_user_member_set_user_affiliation_869@domain.example.com/res1 in
<iq from='domain.example.com' to='alice_user_member_set_user_affiliation_869@domain.example.com/res1' id='389a8e1c17b68ae0072c2c957bdf05ce' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-15 20:16:35.217 ***🔗
alice_user_member_set_user_affiliation_869@domain.example.com/res1 out
<presence/>



*** User 2024-04-15 20:16:35.219 ***🔗
alice_user_member_set_user_affiliation_869@domain.example.com/res1 in
<presence from='alice_user_member_set_user_affiliation_869@domain.example.com/res1' to='alice_user_member_set_user_affiliation_869@domain.example.com/res1'/>



*** User 2024-04-15 20:16:35.220 ***🔗
bOb_user_member_set_user_affiliation_869@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-15 20:16:35.220 ***🔗
bOb_user_member_set_user_affiliation_869@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='deef6c3138853703' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2024-04-15 20:16:35.220 ***🔗
bOb_user_member_set_user_affiliation_869@domain.example.com/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-15 20:16:35.221 ***🔗
bOb_user_member_set_user_affiliation_869@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl91c2VyX21lbWJlcl9zZXRfdXNlcl9hZmZpbGlhdGlvbl84NjkAbWFrcm9saWth</auth>



*** User 2024-04-15 20:16:35.222 ***🔗
bOb_user_member_set_user_affiliation_869@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-15 20:16:35.222 ***🔗
bOb_user_member_set_user_affiliation_869@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-15 20:16:35.223 ***🔗
bOb_user_member_set_user_affiliation_869@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e5980438d2a8ece4' from='domain.example.com' version='1.0' xml:lang='en' to='bob_user_member_set_user_affiliation_869@domain.example.com'>

*** User 2024-04-15 20:16:35.223 ***🔗
bOb_user_member_set_user_affiliation_869@domain.example.com/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-15 20:16:35.224 ***🔗
bOb_user_member_set_user_affiliation_869@domain.example.com/res1 out
<iq type='set' id='333ebd4144356fea81b99beecce71a1d'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-15 20:16:35.224 ***🔗
bOb_user_member_set_user_affiliation_869@domain.example.com/res1 in
<iq id='333ebd4144356fea81b99beecce71a1d' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_user_member_set_user_affiliation_869@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2024-04-15 20:16:35.225 ***🔗
bob_user_member_set_user_affiliation_869@domain.example.com/res1 out
<iq type='set' id='e39a4ded9e96c6ea6cb72c8a2031c805'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-15 20:16:35.225 ***🔗
bob_user_member_set_user_affiliation_869@domain.example.com/res1 in
<iq from='domain.example.com' to='bob_user_member_set_user_affiliation_869@domain.example.com/res1' id='e39a4ded9e96c6ea6cb72c8a2031c805' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-15 20:16:35.226 ***🔗
bob_user_member_set_user_affiliation_869@domain.example.com/res1 out
<presence/>



*** User 2024-04-15 20:16:35.227 ***🔗
bob_user_member_set_user_affiliation_869@domain.example.com/res1 in
<presence from='bob_user_member_set_user_affiliation_869@domain.example.com/res1' to='bob_user_member_set_user_affiliation_869@domain.example.com/res1'/>



*** User 2024-04-15 20:16:35.228 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-15 20:16:35.229 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='172c2ed0d1337edd' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2024-04-15 20:16:35.229 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/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-15 20:16:35.229 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODY5AG1ha3Jvd2U7cA==</auth>



*** User 2024-04-15 20:16:35.230 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2024-04-15 20:16:35.230 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2024-04-15 20:16:35.230 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='032c7f0ef70c9fbf' from='domain.example.com' version='1.0' xml:lang='en' to='kate_user_member_set_user_affiliation_869@domain.example.com'>

*** User 2024-04-15 20:16:35.230 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/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-15 20:16:35.231 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/res1 out
<iq type='set' id='b393f672813ac701d3f82e1b9f1adbc5'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2024-04-15 20:16:35.232 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/res1 in
<iq id='b393f672813ac701d3f82e1b9f1adbc5' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>kate_user_member_set_user_affiliation_869@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2024-04-15 20:16:35.232 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/res1 out
<iq type='set' id='5d259b4ad865969b71992d002f22af1b'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-15 20:16:35.232 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/res1 in
<iq from='domain.example.com' to='kate_user_member_set_user_affiliation_869@domain.example.com/res1' id='5d259b4ad865969b71992d002f22af1b' type='result'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2024-04-15 20:16:35.233 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/res1 out
<presence/>



*** User 2024-04-15 20:16:35.234 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/res1 in
<presence from='kate_user_member_set_user_affiliation_869@domain.example.com/res1' to='kate_user_member_set_user_affiliation_869@domain.example.com/res1'/>



*** User 2024-04-15 20:16:35.236 ***🔗
REST request:
Code: 200
Req: {<0.20289.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"06dc97c84a0491be">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODY5QGRvbWFpbi5leGFtcGxlLmNvbTptYXR5Z3J5c2E=">>}],
      <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_869@groupchats.domain.example.com\",\"user\":\"bob_user_member_set_user_affiliation_869@domain.example.com\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 15 Apr 2024 20:16:35 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"70">>}],
         <<"{\"data\":{\"muc\":{\"setUserAffiliation\":\"Affiliation set successfully\"}}}">>,
         208,981}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          role => {graphql,user},
          body =>
              <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_869@groupchats.domain.example.com\",\"user\":\"bob_user_member_set_user_affiliation_869@domain.example.com\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          method => <<"POST">>,
          creds =>
              {<<"alice_user_member_set_user_affiliation_869@domain.example.com">>,
               <<"matygrysa">>},
          return_maps => true,return_headers => true}


*** User 2024-04-15 20:16:35.239 ***🔗
REST request:
Code: 200
Req: {<0.20302.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"825fde49dfd6bb7f">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg2OUBkb21haW4uZXhhbXBsZS5jb206bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_869@groupchats.domain.example.com\",\"user\":\"kate_user_member_set_user_affiliation_869@domain.example.com\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 15 Apr 2024 20:16:35 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"294">>}],
         <<"{\"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_869@groupchats.domain.example.com\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         433,1174}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          role => {graphql,user},
          body =>
              <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_869@groupchats.domain.example.com\",\"user\":\"kate_user_member_set_user_affiliation_869@domain.example.com\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          method => <<"POST">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_869@domain.example.com">>,
               <<"makrolika">>},
          return_maps => true,return_headers => true}


*** User 2024-04-15 20:16:35.303 ***🔗
REST request:
Code: 200
Req: {<0.20319.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"dc4afcf0d7ba0158">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg2OUBkb21haW4uZXhhbXBsZS5jb206bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"ADMIN\",\"room\":\"room-alice_user_member_set_user_affiliation_869@groupchats.domain.example.com\",\"user\":\"kate_user_member_set_user_affiliation_869@domain.example.com\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 15 Apr 2024 20:16:35 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"293">>}],
         <<"{\"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_869@groupchats.domain.example.com\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         432,1148}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          role => {graphql,user},
          body =>
              <<"{\"variables\":{\"affiliation\":\"ADMIN\",\"room\":\"room-alice_user_member_set_user_affiliation_869@groupchats.domain.example.com\",\"user\":\"kate_user_member_set_user_affiliation_869@domain.example.com\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          method => <<"POST">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_869@domain.example.com">>,
               <<"makrolika">>},
          return_maps => true,return_headers => true}


*** User 2024-04-15 20:16:35.306 ***🔗
REST request:
Code: 200
Req: {<0.20330.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"7066404d71a38d7f">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg2OUBkb21haW4uZXhhbXBsZS5jb206bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"OWNER\",\"room\":\"room-alice_user_member_set_user_affiliation_869@groupchats.domain.example.com\",\"user\":\"kate_user_member_set_user_affiliation_869@domain.example.com\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 15 Apr 2024 20:16:35 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"293">>}],
         <<"{\"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_869@groupchats.domain.example.com\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         432,1091}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          role => {graphql,user},
          body =>
              <<"{\"variables\":{\"affiliation\":\"OWNER\",\"room\":\"room-alice_user_member_set_user_affiliation_869@groupchats.domain.example.com\",\"user\":\"kate_user_member_set_user_affiliation_869@domain.example.com\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          method => <<"POST">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_869@domain.example.com">>,
               <<"makrolika">>},
          return_maps => true,return_headers => true}


*** User 2024-04-15 20:16:35.307 ***🔗
REST request:
Code: 200
Req: {<0.20340.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"527ceb9ad5e96a9b">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fODY5QGRvbWFpbi5leGFtcGxlLmNvbTptYXR5Z3J5c2E=">>}],
      <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_869@groupchats.domain.example.com\",\"user\":\"kate_user_member_set_user_affiliation_869@domain.example.com\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 15 Apr 2024 20:16:35 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"70">>}],
         <<"{\"data\":{\"muc\":{\"setUserAffiliation\":\"Affiliation set successfully\"}}}">>,
         208,906}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          role => {graphql,user},
          body =>
              <<"{\"variables\":{\"affiliation\":\"MEMBER\",\"room\":\"room-alice_user_member_set_user_affiliation_869@groupchats.domain.example.com\",\"user\":\"kate_user_member_set_user_affiliation_869@domain.example.com\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          method => <<"POST">>,
          creds =>
              {<<"alice_user_member_set_user_affiliation_869@domain.example.com">>,
               <<"matygrysa">>},
          return_maps => true,return_headers => true}


*** User 2024-04-15 20:16:35.310 ***🔗
REST request:
Code: 200
Req: {<0.20345.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"401057c6af495b24">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzg2OUBkb21haW4uZXhhbXBsZS5jb206bWFrcm9saWth">>}],
      <<"{\"variables\":{\"affiliation\":\"NONE\",\"room\":\"room-alice_user_member_set_user_affiliation_869@groupchats.domain.example.com\",\"user\":\"kate_user_member_set_user_affiliation_869@domain.example.com\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Mon, 15 Apr 2024 20:16:35 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"292">>}],
         <<"{\"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_869@groupchats.domain.example.com\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         431,1153}
Params: #{port => 5561,path => <<"/api/graphql">>,
          server => #{node => mongooseim@localhost},
          role => {graphql,user},
          body =>
              <<"{\"variables\":{\"affiliation\":\"NONE\",\"room\":\"room-alice_user_member_set_user_affiliation_869@groupchats.domain.example.com\",\"user\":\"kate_user_member_set_user_affiliation_869@domain.example.com\"},\"query\":\"mutation ($affiliation: MUCAffiliation!, $room: BareJID!, $user: JID!) { muc { setUserAffiliation(affiliation: $affiliation, room: $room, user: $user) } }\"}">>,
          method => <<"POST">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_869@domain.example.com">>,
               <<"makrolika">>},
          return_maps => true,return_headers => true}


*** User 2024-04-15 20:16:35.311 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/res1 out
</stream:stream>

*** User 2024-04-15 20:16:35.311 ***🔗
kate_user_member_set_user_affiliation_869@domain.example.com/res1 in
</stream:stream>

*** User 2024-04-15 20:16:35.311 ***🔗
bob_user_member_set_user_affiliation_869@domain.example.com/res1 out
</stream:stream>

*** User 2024-04-15 20:16:35.312 ***🔗
bob_user_member_set_user_affiliation_869@domain.example.com/res1 in
</stream:stream>

*** User 2024-04-15 20:16:35.312 ***🔗
alice_user_member_set_user_affiliation_869@domain.example.com/res1 out
</stream:stream>

*** User 2024-04-15 20:16:35.312 ***🔗
alice_user_member_set_user_affiliation_869@domain.example.com/res1 in
</stream:stream>

*** User 2024-04-15 20:16:35.313 ***🔗
waiting for room_archive_size is done in 0 miliseconds
*** CT 2024-04-15 20:16:35.328 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_1488.html



=== Ended at 2024-04-15 20:16:35
=== successfully completed test case
=== === Returned value: ok