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

=== Config value:

    [{schema_endpoint,user},
     {watchdog,<0.18293.0>},
     {mam_backend,rdbms},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/graphql_muc_SUITE_data"},
     {preset,"pgsql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@3b05d744781a.2022-05-18_09.59.20/big_tests.tests.graphql_muc_SUITE.logs/run.2022-05-18_10.02.16/graphql_muc_suite.user_member_set_user_affiliation.26755.html"},
     {tc_group_properties,[{name,user_muc},parallel]},
     {tc_group_path,[]},
     {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@3b05d744781a.2022-05-18_09.59.20/big_tests.tests.graphql_muc_SUITE.logs/run.2022-05-18_10.02.16/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{mod_adhoc => #{iqdisc => one_queue,report_commands_node => false},
        mod_amp => #{},
        mod_bosh =>
            #{backend => mnesia,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false},
        mod_cache_users =>
            #{number_of_segments => 5,strategy => fifo,time_to_live => 2},
        mod_carboncopy => #{iqdisc => no_queue},
        mod_commands => #{},
        mod_disco =>
            #{extra_domains => [],iqdisc => one_queue,server_info => [],
              users_can_see_hidden_services => false},
        mod_muc_commands => #{},mod_muc_light_commands => #{},
        mod_register =>
            #{access => register,
              ip_access => [{allow,"127.0.0.0/8"},{deny,"0.0.0.0/0"}],
              iqdisc => one_queue,password_strength => 0,
              registration_watchers => []},
        mod_roster =>
            #{backend => rdbms,iqdisc => one_queue,store_current_id => false,
              versioning => false},
        mod_sic => #{iqdisc => one_queue},
        mod_stream_management =>
            #{ack => true,ack_freq => 1,backend => mnesia,buffer => true,
              buffer_max => 100,resume_timeout => 600,
              stale_h =>
                  #{enabled => false,geriatric => 3600,repeat_after => 1800}},
        mod_vcard =>
            #{backend => rdbms,
              host => {prefix,<<"vjud.">>},
              iqdisc => parallel,matches => 30,search => true}}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@3b05d744781a.2022-05-18_09.59.20"

=== Started at 2022-05-18 10:02:16


*** CT 2022-05-18 10:02:16.979 *** View log from node mongooseim@localhost when started mongooseim@localhost_834.html
*** CT 2022-05-18 10:02:16.984 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_401.html

*** User 2022-05-18 10:02:17.204 ***
alicE_user_member_set_user_affiliation_754@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-18 10:02:17.206 ***
alicE_user_member_set_user_affiliation_754@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='c3ad007a1ecdbb71' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-18 10:02:17.206 ***
alicE_user_member_set_user_affiliation_754@localhost/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-05-18 10:02:17.206 ***
alicE_user_member_set_user_affiliation_754@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzc1NABtYXR5Z3J5c2E=</auth>



*** User 2022-05-18 10:02:17.208 ***
alicE_user_member_set_user_affiliation_754@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-18 10:02:17.209 ***
alicE_user_member_set_user_affiliation_754@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-18 10:02:17.209 ***
alicE_user_member_set_user_affiliation_754@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='14c5ffbe64ec1e2e' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-18 10:02:17.210 ***
alicE_user_member_set_user_affiliation_754@localhost/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-05-18 10:02:17.210 ***
alicE_user_member_set_user_affiliation_754@localhost/res1 out
<iq type='set' id='4bd929d073c45f8240a3e850760bd2a6'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-18 10:02:17.211 ***
alicE_user_member_set_user_affiliation_754@localhost/res1 in
<iq id='4bd929d073c45f8240a3e850760bd2a6' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_user_member_set_user_affiliation_754@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-05-18 10:02:17.211 ***
alice_user_member_set_user_affiliation_754@localhost/res1 out
<iq type='set' id='3ae12e6e97886e064f3a2269301fd88b'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-18 10:02:17.211 ***
alice_user_member_set_user_affiliation_754@localhost/res1 in
<iq type='result' id='3ae12e6e97886e064f3a2269301fd88b'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-18 10:02:17.212 ***
alice_user_member_set_user_affiliation_754@localhost/res1 out
<presence/>



*** User 2022-05-18 10:02:17.272 ***
alice_user_member_set_user_affiliation_754@localhost/res1 in
<presence from='alice_user_member_set_user_affiliation_754@localhost/res1' to='alice_user_member_set_user_affiliation_754@localhost/res1' xml:lang='en'/>



*** User 2022-05-18 10:02:17.272 ***
bOb_user_member_set_user_affiliation_754@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-18 10:02:17.274 ***
bOb_user_member_set_user_affiliation_754@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d178bd38e1c77e6b' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-18 10:02:17.275 ***
bOb_user_member_set_user_affiliation_754@localhost/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-05-18 10:02:17.275 ***
bOb_user_member_set_user_affiliation_754@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl91c2VyX21lbWJlcl9zZXRfdXNlcl9hZmZpbGlhdGlvbl83NTQAbWFrcm9saWth</auth>



*** User 2022-05-18 10:02:17.277 ***
bOb_user_member_set_user_affiliation_754@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-18 10:02:17.277 ***
bOb_user_member_set_user_affiliation_754@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-18 10:02:17.278 ***
bOb_user_member_set_user_affiliation_754@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='1e02e6f8afa61d64' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-18 10:02:17.278 ***
bOb_user_member_set_user_affiliation_754@localhost/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-05-18 10:02:17.278 ***
bOb_user_member_set_user_affiliation_754@localhost/res1 out
<iq type='set' id='f9ee79d6366dc8dee247ac7c1011ef32'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-18 10:02:17.279 ***
bOb_user_member_set_user_affiliation_754@localhost/res1 in
<iq id='f9ee79d6366dc8dee247ac7c1011ef32' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_user_member_set_user_affiliation_754@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-05-18 10:02:17.279 ***
bob_user_member_set_user_affiliation_754@localhost/res1 out
<iq type='set' id='84e7cd96262cc1dc627e8952ce29a601'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-18 10:02:17.279 ***
bob_user_member_set_user_affiliation_754@localhost/res1 in
<iq type='result' id='84e7cd96262cc1dc627e8952ce29a601'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-18 10:02:17.279 ***
bob_user_member_set_user_affiliation_754@localhost/res1 out
<presence/>



*** User 2022-05-18 10:02:17.285 ***
bob_user_member_set_user_affiliation_754@localhost/res1 in
<presence from='bob_user_member_set_user_affiliation_754@localhost/res1' to='bob_user_member_set_user_affiliation_754@localhost/res1' xml:lang='en'/>



*** User 2022-05-18 10:02:17.286 ***
kate_user_member_set_user_affiliation_754@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-18 10:02:17.287 ***
kate_user_member_set_user_affiliation_754@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='81108241384ef4e8' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-18 10:02:17.287 ***
kate_user_member_set_user_affiliation_754@localhost/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-05-18 10:02:17.287 ***
kate_user_member_set_user_affiliation_754@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGthdGVfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fNzU0AG1ha3Jvd2U7cA==</auth>



*** User 2022-05-18 10:02:17.291 ***
kate_user_member_set_user_affiliation_754@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-18 10:02:17.291 ***
kate_user_member_set_user_affiliation_754@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-18 10:02:17.292 ***
kate_user_member_set_user_affiliation_754@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='0c6dec976829f104' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-18 10:02:17.292 ***
kate_user_member_set_user_affiliation_754@localhost/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-05-18 10:02:17.292 ***
kate_user_member_set_user_affiliation_754@localhost/res1 out
<iq type='set' id='2d5cc89a188230a4d33e68f2f5fd74f4'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-18 10:02:17.292 ***
kate_user_member_set_user_affiliation_754@localhost/res1 in
<iq id='2d5cc89a188230a4d33e68f2f5fd74f4' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>kate_user_member_set_user_affiliation_754@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-05-18 10:02:17.293 ***
kate_user_member_set_user_affiliation_754@localhost/res1 out
<iq type='set' id='ca39bfadd03be5791c071ff587c584dc'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-18 10:02:17.293 ***
kate_user_member_set_user_affiliation_754@localhost/res1 in
<iq type='result' id='ca39bfadd03be5791c071ff587c584dc'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-18 10:02:17.293 ***
kate_user_member_set_user_affiliation_754@localhost/res1 out
<presence/>



*** User 2022-05-18 10:02:17.297 ***
kate_user_member_set_user_affiliation_754@localhost/res1 in
<presence from='kate_user_member_set_user_affiliation_754@localhost/res1' to='kate_user_member_set_user_affiliation_754@localhost/res1' xml:lang='en'/>



*** User 2022-05-18 10:02:17.300 ***
REST request:
Code: 200
Req: {<0.18981.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4cbfe0c97fb7ca03">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fNzU0QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<"{\"variables\":{\"user\":\"bob_user_member_set_user_affiliation_754@localhost\",\"room\":\"room-alice_user_member_set_user_affiliation_754@muc.localhost\",\"affiliation\":\"MEMBER\"},\"query\":\"mutation M1($room: JID!, $user: JID!, $affiliation: MUCAffiliation!)\\n               { muc { setUserAffiliation(room: $room, user: $user, affiliation: $affiliation) } }\",\"operationName\":\"M1\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 18 May 2022 10:02:16 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"70">>}],
         <<"{\"data\":{\"muc\":{\"setUserAffiliation\":\"Affiliation set successfully\"}}}">>,
         208,1443}
Params: #{body =>
              <<"{\"variables\":{\"user\":\"bob_user_member_set_user_affiliation_754@localhost\",\"room\":\"room-alice_user_member_set_user_affiliation_754@muc.localhost\",\"affiliation\":\"MEMBER\"},\"query\":\"mutation M1($room: JID!, $user: JID!, $affiliation: MUCAffiliation!)\\n               { muc { setUserAffiliation(room: $room, user: $user, affiliation: $affiliation) } }\",\"operationName\":\"M1\"}">>,
          creds =>
              {<<"alice_user_member_set_user_affiliation_754@localhost">>,
               <<"matygrysa">>},
          method => <<"POST">>,path => <<"/api/graphql">>,port => 5561,
          return_headers => true,return_maps => true,
          role => {graphql,<<"user">>},
          server => #{node => mongooseim@localhost}}


*** User 2022-05-18 10:02:17.303 ***
REST request:
Code: 200
Req: {<0.18994.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"0256988e8aa91645">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzc1NEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"user\":\"kate_user_member_set_user_affiliation_754@localhost\",\"room\":\"room-alice_user_member_set_user_affiliation_754@muc.localhost\",\"affiliation\":\"MEMBER\"},\"query\":\"mutation M1($room: JID!, $user: JID!, $affiliation: MUCAffiliation!)\\n               { muc { setUserAffiliation(room: $room, user: $user, affiliation: $affiliation) } }\",\"operationName\":\"M1\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 18 May 2022 10:02:16 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_754@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         417,1485}
Params: #{body =>
              <<"{\"variables\":{\"user\":\"kate_user_member_set_user_affiliation_754@localhost\",\"room\":\"room-alice_user_member_set_user_affiliation_754@muc.localhost\",\"affiliation\":\"MEMBER\"},\"query\":\"mutation M1($room: JID!, $user: JID!, $affiliation: MUCAffiliation!)\\n               { muc { setUserAffiliation(room: $room, user: $user, affiliation: $affiliation) } }\",\"operationName\":\"M1\"}">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_754@localhost">>,
               <<"makrolika">>},
          method => <<"POST">>,path => <<"/api/graphql">>,port => 5561,
          return_headers => true,return_maps => true,
          role => {graphql,<<"user">>},
          server => #{node => mongooseim@localhost}}


*** User 2022-05-18 10:02:17.370 ***
REST request:
Code: 200
Req: {<0.19008.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"c0419ee3cb7ef9f6">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzc1NEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"user\":\"kate_user_member_set_user_affiliation_754@localhost\",\"room\":\"room-alice_user_member_set_user_affiliation_754@muc.localhost\",\"affiliation\":\"ADMIN\"},\"query\":\"mutation M1($room: JID!, $user: JID!, $affiliation: MUCAffiliation!)\\n               { muc { setUserAffiliation(room: $room, user: $user, affiliation: $affiliation) } }\",\"operationName\":\"M1\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 18 May 2022 10:02:16 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_754@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         416,1857}
Params: #{body =>
              <<"{\"variables\":{\"user\":\"kate_user_member_set_user_affiliation_754@localhost\",\"room\":\"room-alice_user_member_set_user_affiliation_754@muc.localhost\",\"affiliation\":\"ADMIN\"},\"query\":\"mutation M1($room: JID!, $user: JID!, $affiliation: MUCAffiliation!)\\n               { muc { setUserAffiliation(room: $room, user: $user, affiliation: $affiliation) } }\",\"operationName\":\"M1\"}">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_754@localhost">>,
               <<"makrolika">>},
          method => <<"POST">>,path => <<"/api/graphql">>,port => 5561,
          return_headers => true,return_maps => true,
          role => {graphql,<<"user">>},
          server => #{node => mongooseim@localhost}}


*** User 2022-05-18 10:02:17.373 ***
REST request:
Code: 200
Req: {<0.19033.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"9425d4774aff3def">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzc1NEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"user\":\"kate_user_member_set_user_affiliation_754@localhost\",\"room\":\"room-alice_user_member_set_user_affiliation_754@muc.localhost\",\"affiliation\":\"OWNER\"},\"query\":\"mutation M1($room: JID!, $user: JID!, $affiliation: MUCAffiliation!)\\n               { muc { setUserAffiliation(room: $room, user: $user, affiliation: $affiliation) } }\",\"operationName\":\"M1\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 18 May 2022 10:02:16 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_754@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         416,1917}
Params: #{body =>
              <<"{\"variables\":{\"user\":\"kate_user_member_set_user_affiliation_754@localhost\",\"room\":\"room-alice_user_member_set_user_affiliation_754@muc.localhost\",\"affiliation\":\"OWNER\"},\"query\":\"mutation M1($room: JID!, $user: JID!, $affiliation: MUCAffiliation!)\\n               { muc { setUserAffiliation(room: $room, user: $user, affiliation: $affiliation) } }\",\"operationName\":\"M1\"}">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_754@localhost">>,
               <<"makrolika">>},
          method => <<"POST">>,path => <<"/api/graphql">>,port => 5561,
          return_headers => true,return_maps => true,
          role => {graphql,<<"user">>},
          server => #{node => mongooseim@localhost}}


*** User 2022-05-18 10:02:17.377 ***
REST request:
Code: 200
Req: {<0.19047.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"5b3358cb0007f7b9">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfdXNlcl9tZW1iZXJfc2V0X3VzZXJfYWZmaWxpYXRpb25fNzU0QGxvY2FsaG9zdDptYXR5Z3J5c2E=">>}],
      <<"{\"variables\":{\"user\":\"kate_user_member_set_user_affiliation_754@localhost\",\"room\":\"room-alice_user_member_set_user_affiliation_754@muc.localhost\",\"affiliation\":\"MEMBER\"},\"query\":\"mutation M1($room: JID!, $user: JID!, $affiliation: MUCAffiliation!)\\n               { muc { setUserAffiliation(room: $room, user: $user, affiliation: $affiliation) } }\",\"operationName\":\"M1\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 18 May 2022 10:02:16 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"70">>}],
         <<"{\"data\":{\"muc\":{\"setUserAffiliation\":\"Affiliation set successfully\"}}}">>,
         208,2901}
Params: #{body =>
              <<"{\"variables\":{\"user\":\"kate_user_member_set_user_affiliation_754@localhost\",\"room\":\"room-alice_user_member_set_user_affiliation_754@muc.localhost\",\"affiliation\":\"MEMBER\"},\"query\":\"mutation M1($room: JID!, $user: JID!, $affiliation: MUCAffiliation!)\\n               { muc { setUserAffiliation(room: $room, user: $user, affiliation: $affiliation) } }\",\"operationName\":\"M1\"}">>,
          creds =>
              {<<"alice_user_member_set_user_affiliation_754@localhost">>,
               <<"matygrysa">>},
          method => <<"POST">>,path => <<"/api/graphql">>,port => 5561,
          return_headers => true,return_maps => true,
          role => {graphql,<<"user">>},
          server => #{node => mongooseim@localhost}}


*** User 2022-05-18 10:02:17.380 ***
REST request:
Code: 200
Req: {<0.19067.0>,<<"/api/graphql">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"5d47fa112036026a">>},
       {<<"authorization">>,
        <<"Basic Ym9iX3VzZXJfbWVtYmVyX3NldF91c2VyX2FmZmlsaWF0aW9uXzc1NEBsb2NhbGhvc3Q6bWFrcm9saWth">>}],
      <<"{\"variables\":{\"user\":\"kate_user_member_set_user_affiliation_754@localhost\",\"room\":\"room-alice_user_member_set_user_affiliation_754@muc.localhost\",\"affiliation\":\"NONE\"},\"query\":\"mutation M1($room: JID!, $user: JID!, $affiliation: MUCAffiliation!)\\n               { muc { setUserAffiliation(room: $room, user: $user, affiliation: $affiliation) } }\",\"operationName\":\"M1\"}">>}
Result: {{<<"200">>,<<"OK">>},
         [{<<"vary">>,<<"accept">>},
          {<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 18 May 2022 10:02:16 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_754@muc.localhost\",\"code\":\"not_allowed\"}}],\"data\":{\"muc\":{\"setUserAffiliation\":null}}}">>,
         415,958}
Params: #{body =>
              <<"{\"variables\":{\"user\":\"kate_user_member_set_user_affiliation_754@localhost\",\"room\":\"room-alice_user_member_set_user_affiliation_754@muc.localhost\",\"affiliation\":\"NONE\"},\"query\":\"mutation M1($room: JID!, $user: JID!, $affiliation: MUCAffiliation!)\\n               { muc { setUserAffiliation(room: $room, user: $user, affiliation: $affiliation) } }\",\"operationName\":\"M1\"}">>,
          creds =>
              {<<"bob_user_member_set_user_affiliation_754@localhost">>,
               <<"makrolika">>},
          method => <<"POST">>,path => <<"/api/graphql">>,port => 5561,
          return_headers => true,return_maps => true,
          role => {graphql,<<"user">>},
          server => #{node => mongooseim@localhost}}


*** User 2022-05-18 10:02:17.380 ***
kate_user_member_set_user_affiliation_754@localhost/res1 out
</stream:stream>

*** User 2022-05-18 10:02:17.380 ***
kate_user_member_set_user_affiliation_754@localhost/res1 in
</stream:stream>

*** User 2022-05-18 10:02:17.380 ***
bob_user_member_set_user_affiliation_754@localhost/res1 out
</stream:stream>

*** User 2022-05-18 10:02:17.381 ***
bob_user_member_set_user_affiliation_754@localhost/res1 in
</stream:stream>

*** User 2022-05-18 10:02:17.381 ***
alice_user_member_set_user_affiliation_754@localhost/res1 out
</stream:stream>

*** User 2022-05-18 10:02:17.381 ***
alice_user_member_set_user_affiliation_754@localhost/res1 in
</stream:stream>
*** CT 2022-05-18 10:02:17.390 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_401.html
*** CT 2022-05-18 10:02:17.391 *** View log from node mongooseim@localhost when finished mongooseim@localhost_835.html



=== Ended at 2022-05-18 10:02:17
=== successfully completed test case
=== === Returned value: ok