=== Test case: rest_client_SUITE:aff_change_msg_is_delivered_over_sse/1 (click for source code)

=== Config value:

    [{watchdog,<0.53580.0>},
     {muc_light_host,<<"muclight.localhost">>},
     {mam_backend,disabled},
     {preset,"ldap_mnesia"},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/rest_client_SUITE_data"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@36479f279a1b.2024-04-12_09.30.15/big_tests.tests.rest_client_SUITE.logs/run.2024-04-12_09.41.22/rest_client_suite.aff_change_msg_is_delivered_over_sse.23685.html"},
     {tc_group_properties,[{name,muc},parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/rest_client_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@36479f279a1b.2024-04-12_09.30.15/big_tests.tests.rest_client_SUITE.logs/run.2024-04-12_09.41.22/log_private/"},
     {{saved_modules,mongooseim@localhost,<<"localhost">>},
      #{mod_vcard =>
            #{matches => 30,
              host => {prefix,<<"vjud.">>},
              search => true,
              ldap =>
                  #{filter => <<"(objectClass=inetOrgPerson)">>,
                    base => <<"ou=Users,dc=esl,dc=com">>,
                    vcard_map =>
                        [{<<"NICKNAME">>,<<"%u">>,[]},
                         {<<"FN">>,<<"%s">>,[<<"displayName">>]},
                         {<<"FAMILY">>,<<"%s">>,[<<"sn">>]},
                         {<<"GIVEN">>,<<"%s">>,[<<"givenName">>]},
                         {<<"MIDDLE">>,<<"%s">>,[<<"initials">>]},
                         {<<"ORGNAME">>,<<"%s">>,[<<"o">>]},
                         {<<"ORGUNIT">>,<<"%s">>,[<<"ou">>]},
                         {<<"CTRY">>,<<"%s">>,[<<"c">>]},
                         {<<"LOCALITY">>,<<"%s">>,[<<"l">>]},
                         {<<"STREET">>,<<"%s">>,[<<"street">>]},
                         {<<"REGION">>,<<"%s">>,[<<"st">>]},
                         {<<"PCODE">>,<<"%s">>,[<<"postalCode">>]},
                         {<<"TITLE">>,<<"%s">>,[<<"title">>]},
                         {<<"URL">>,<<"%s">>,[<<"labeleduri">>]},
                         {<<"DESC">>,<<"%s">>,[<<"description">>]},
                         {<<"TEL">>,<<"%s">>,[<<"telephoneNumber">>]},
                         {<<"EMAIL">>,<<"%s">>,[<<"mail">>]},
                         {<<"BDAY">>,<<"%s">>,[<<"birthDay">>]},
                         {<<"ROLE">>,<<"%s">>,[<<"employeeType">>]},
                         {<<"PHOTO">>,<<"%s">>,[<<"jpegPhoto">>]}],
                    search_fields =>
                        [{<<"User">>,<<"%u">>},
                         {<<"Full Name">>,<<"displayName">>},
                         {<<"Given Name">>,<<"givenName">>},
                         {<<"Middle Name">>,<<"initials">>},
                         {<<"Family Name">>,<<"sn">>},
                         {<<"Nickname">>,<<"%u">>},
                         {<<"Birthday">>,<<"birthDay">>},
                         {<<"Country">>,<<"c">>},
                         {<<"City">>,<<"l">>},
                         {<<"Email">>,<<"mail">>},
                         {<<"Organization Name">>,<<"o">>},
                         {<<"Organization Unit">>,<<"ou">>}],
                    pool_tag => default,deref => never,
                    uids => [{<<"uid">>,<<"%u">>}],
                    search_reported =>
                        [{<<"Full Name">>,<<"FN">>},
                         {<<"Given Name">>,<<"FIRST">>},
                         {<<"Middle Name">>,<<"MIDDLE">>},
                         {<<"Family Name">>,<<"LAST">>},
                         {<<"Nickname">>,<<"NICK">>},
                         {<<"Birthday">>,<<"BDAY">>},
                         {<<"Country">>,<<"CTRY">>},
                         {<<"City">>,<<"LOCALITY">>},
                         {<<"Email">>,<<"EMAIL">>},
                         {<<"Organization Name">>,<<"ORGNAME">>},
                         {<<"Organization Unit">>,<<"ORGUNIT">>}],
                    search_operator => 'and',binary_search_fields => []},
              iqdisc => parallel,backend => ldap},
        mod_roster =>
            #{iqdisc => one_queue,backend => mnesia,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,users_can_see_hidden_services => false,
              server_info => [],extra_domains => []},
        mod_presence => #{},
        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_carboncopy => #{iqdisc => no_queue},
        mod_cache_users =>
            #{strategy => fifo,number_of_segments => 5,time_to_live => 2},
        mod_bosh =>
            #{backend => mnesia,inactivity => 30,max_pause => 120,
              max_wait => infinity,server_acks => false}}}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@36479f279a1b.2024-04-12_09.30.15"

=== Started at 2024-04-12 09:41:22


*** CT 2024-04-12 09:41:22.670 *** View log from node mongooseim@localhost when started🔗 mongooseim@localhost_4439.html

*** User 2024-04-12 09:41:22.767 ***🔗
REST request:
Code: 201
Req: {<0.53969.0>,<<"/api/rooms">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"3d31fc26a1f085c7">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfYWZmX2NoYW5nZV9tc2dfaXNfZGVsaXZlcmVkX292ZXJfc3NlXzE3NzVAbG9jYWxob3N0Om1hdHlncnlzYQ==">>}],
      <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>}
Result: {{<<"201">>,<<"Created">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 12 Apr 2024 09:41:22 GMT">>},
          {<<"content-type">>,<<"application/json">>},
          {<<"content-length">>,<<"27">>}],
         <<"{\"id\":\"1712-914882-767175\"}">>,156,6133}
Params: #{path => <<"/api/rooms">>,
          server => #{node => mongooseim@localhost},
          creds =>
              {<<"alice_aff_change_msg_is_delivered_over_sse_1775@localhost">>,
               <<"matygrysa">>},
          method => <<"POST">>,
          body =>
              <<"{\"subject\":\"This room subject\",\"name\":\"new_room_name\"}">>,
          role => client,return_headers => true}


*** User 2024-04-12 09:41:22.767 ***🔗
Connect to SSE, port: 8089, path: /api/sse, creds: {<<"bob_aff_change_msg_is_delivered_over_sse_1775@localhost">>,
                                                    <<"makrolika">>}, extra opts: #{transport =>
                                                                                     tls,
                                                                                    tls_opts =>
                                                                                     [{verify,
                                                                                       verify_none}]}

*** User 2024-04-12 09:41:22.838 ***🔗
SSE response code: 200, headers: [{<<"cache-control">>,<<"no-cache">>},
                                  {<<"content-type">>,<<"text/event-stream">>},
                                  {<<"date">>,
                                   <<"Fri, 12 Apr 2024 09:41:22 GMT">>},
                                  {<<"server">>,<<"Cowboy">>},
                                  {<<"transfer-encoding">>,<<"chunked">>}], result: #{pid =>
                                                                                          <0.54030.0>,
                                                                                      stream_ref =>
                                                                                          #Ref<0.2437788764.1447034884.120088>}

*** User 2024-04-12 09:41:22.852 ***🔗
REST request:
Code: 204
Req: {<0.54104.0>,<<"/api/rooms/1712-914882-767175/users">>,<<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"ea8779505c6cde5e">>},
       {<<"authorization">>,
        <<"Basic YWxpY2VfYWZmX2NoYW5nZV9tc2dfaXNfZGVsaXZlcmVkX292ZXJfc3NlXzE3NzVAbG9jYWxob3N0Om1hdHlncnlzYQ==">>}],
      <<"{\"user\":\"bob_aff_change_msg_is_delivered_over_sse_1775@localhost\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 12 Apr 2024 09:41:22 GMT">>}],
         <<>>,80,3949}
Params: #{path => <<"/api/rooms/1712-914882-767175/users">>,
          server => #{node => mongooseim@localhost},
          creds =>
              {<<"alice_aff_change_msg_is_delivered_over_sse_1775@localhost">>,
               <<"matygrysa">>},
          method => <<"POST">>,
          body =>
              <<"{\"user\":\"bob_aff_change_msg_is_delivered_over_sse_1775@localhost\"}">>,
          role => client,return_headers => true}


*** User 2024-04-12 09:41:22.852 ***🔗
Received SSE event: #{data =>
                          [<<"{\"room\":\"1712-914882-767175\",\"affiliation\":\"member\",\"from\":\"1712-914882-767175@muclight.localhost\",\"user\":\"bob_aff_change_msg_is_delivered_over_sse_1775@localhost\",\"type\":\"affiliation\",\"timestamp\":1712914882851790,\"id\":\"0f088cec-f73d-4491-8d0e-7f97c9937a7c\"}">>],
                      event_type => <<"room.message">>,
                      last_event_id => <<"1">>}
*** CT 2024-04-12 09:41:22.856 *** View log from node mongooseim@localhost when finished🔗 mongooseim@localhost_4439.html



=== Ended at 2024-04-12 09:41:22
=== successfully completed test case
=== === Returned value: ok