Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified REST API: domains #3768

Merged
merged 6 commits into from
Sep 22, 2022

Conversation

chrzaszcz
Copy link
Member

Integrate the domain REST handler with mongoose_admin_api

The domain handler had some custom code:

  • The auth failed if creds were provided, but not configured. I decided to apply this behaviour to the whole Admin API.
  • Authorization and request parsing. I just used the functionality already provided by mongoose_admin_api.
  • {"what": "message"} error messages. I decided to use the plain-text ones as in mongoose_admin_api.
  • Custom test helpers. I also decided to use the ones for mongoose_admin_api.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Sep 22, 2022

small_tests_24 / small_tests / 05a93cf
Reports root / small


small_tests_25 / small_tests / 05a93cf
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 05a93cf
Reports root/ big
OK: 3840 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 05a93cf
Reports root/ big
OK: 2003 / Failed: 0 / User-skipped: 743 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 05a93cf
Reports root/ big
OK: 3840 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 05a93cf
Reports root/ big
OK: 2003 / Failed: 0 / User-skipped: 743 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 05a93cf
Reports root/ big
OK: 3814 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 05a93cf
Reports root/ big
OK: 3840 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 05a93cf
Reports root/ big
OK: 4214 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 05a93cf
Reports root/ big
OK: 2124 / Failed: 0 / User-skipped: 622 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 05a93cf
Reports root/ big
OK: 2464 / Failed: 0 / User-skipped: 617 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 05a93cf
Reports root/ big
OK: 4225 / Failed: 1 / User-skipped: 97 / Auto-skipped: 0

pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription
{error,
  {{badmatch,
     [{xmlel,<<"message">>,
        [{<<"from">>,
        <<"alice_unsubscribe_after_presence_unsubscription_2469@localhost">>},
         {<<"to">>,
        <<"bob_unsubscribe_after_presence_unsubscription_2469@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"TcU1T3picnLPjMOUD70PDw==">>}],
            [{xmlel,<<"item">>,
               [{<<"id">>,<<"salmon">>}],
               [{xmlel,<<"entry">>,
                  [{<<"xmlns">>,
                  <<"http://www.w3.org/2005/Atom">>}],
                  []}]}]}]},
         {xmlel,<<"headers">>,
           [{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
           []}]}]},
   [{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
      [{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
       {line,384}]},
    {escalus_story,story,4,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
       {line,72}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1291}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1223}]}]}}

Report log


mysql_redis_25 / mysql_redis / 05a93cf
Reports root/ big
OK: 4200 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 05a93cf
Reports root/ big
OK: 4213 / Failed: 1 / User-skipped: 97 / Auto-skipped: 0

inbox_extensions_SUITE:async_pools:one_to_one:mute_muted_entry_gets_unmuted
{error,
  {{assert,
     [{module,inbox_extensions_SUITE},
      {line,798},
      {expression,"escalus_pred : is_message ( Message )"},
      {expected,true},
      {value,false}]},
   [{inbox_extensions_SUITE,check_message_with_properties,4,
      [{file,
         "/home/circleci/project/big_tests/tests/inbox_extensions_SUITE.erl"},
       {line,798}]},
    {inbox_extensions_SUITE,set_inbox_properties,4,
      [{file,
         "/home/circleci/project/big_tests/tests/inbox_extensions_SUITE.erl"},
       {line,792}]},
    {inbox_extensions_SUITE,'-mute_muted_entry_gets_unmuted/1-fun-2-',2,
      [{file,
         "/home/circleci/project/big_tests/tests/inbox_extensions_SUITE.erl"},
       {line,568}]},
    {escalus_story,story,4,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
       {line,72}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1291}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1223}]}]}}

Report log


riak_mnesia_24 / riak_mnesia / 05a93cf
Reports root/ big
OK: 2304 / Failed: 0 / User-skipped: 609 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Sep 22, 2022

Codecov Report

Base: 82.80% // Head: 82.81% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (9082e6e) compared to base (b8ff228).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@                     Coverage Diff                      @@
##           feature/unified-rest-api    #3768      +/-   ##
============================================================
+ Coverage                     82.80%   82.81%   +0.01%     
============================================================
  Files                           533      533              
  Lines                         33895    33872      -23     
============================================================
- Hits                          28067    28052      -15     
+ Misses                         5828     5820       -8     
Impacted Files Coverage Δ
src/mongoose_http_handler.erl 100.00% <ø> (ø)
...stem_metrics/mongoose_system_metrics_collector.erl 94.62% <ø> (ø)
src/mongoose_admin_api/mongoose_admin_api.erl 94.73% <100.00%> (+3.82%) ⬆️
...c/mongoose_admin_api/mongoose_admin_api_domain.erl 100.00% <100.00%> (ø)
src/ejabberd.erl 55.00% <0.00%> (-5.00%) ⬇️
src/muc_light/mod_muc_light_db_mnesia.erl 91.57% <0.00%> (-1.06%) ⬇️
src/mod_muc_log.erl 62.82% <0.00%> (ø)
src/mod_roster.erl 78.70% <0.00%> (+0.23%) ⬆️
src/pubsub/mod_pubsub_db_rdbms.erl 95.34% <0.00%> (+0.25%) ⬆️
src/inbox/mod_inbox_rdbms_async.erl 72.05% <0.00%> (+2.94%) ⬆️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

This way we don't give the false impression of a password being checked.
It already works like this for mongoose_domain_handler.
Paweł Chrząszcz added 3 commits September 22, 2022 09:45
Error messages are changed to capitalized strings, because it is the
convention used for the whole admin API.

Error codes are left as they were except ones that are already
provided by mongoose_admin_api itself, e.g. "401 Unauthorized".

The error messages should be common for REST and GraphQL,
but this unification is left for the future.
@mongoose-im
Copy link
Collaborator

mongoose-im commented Sep 22, 2022

small_tests_24 / small_tests / 2e3e234
Reports root / small


small_tests_25 / small_tests / 2e3e234
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 2e3e234
Reports root/ big
OK: 3840 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 2e3e234
Reports root/ big
OK: 2003 / Failed: 0 / User-skipped: 743 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 2e3e234
Reports root/ big
OK: 2003 / Failed: 0 / User-skipped: 743 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 2e3e234
Reports root/ big
OK: 3840 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 2e3e234
Reports root/ big
OK: 3814 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 2e3e234
Reports root/ big
OK: 2124 / Failed: 0 / User-skipped: 622 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 2e3e234
Reports root/ big
OK: 4214 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 2e3e234
Reports root/ big
OK: 3848 / Failed: 1 / User-skipped: 88 / Auto-skipped: 0

disco_and_caps_SUITE:disco_with_caps:user_cannot_query_friend_resources_with_unknown_node
{error,{{assertion_failed,assert_many,false,[is_roster_set],[],[]},
    [{escalus_new_assert,assert_true,2,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
                {line,84}]},
     {escalus_story,'-make_all_clients_friends/1-fun-0-',2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,112}]},
     {escalus_utils,'-each_with_index/3-fun-0-',3,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,87}]},
     {lists,foldl_1,3,[{file,"lists.erl"},{line,1355}]},
     {escalus_utils,'-each_with_index/3-fun-0-',3,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,87}]},
     {lists,foldl,3,[{file,"lists.erl"},{line,1350}]},
     {escalus_utils,distinct_pairs,2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,60}]},
     {escalus_story,make_all_clients_friends,1,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,106}]}]}}

Report log


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 2e3e234
Reports root/ big
OK: 2464 / Failed: 0 / User-skipped: 617 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 2e3e234
Reports root/ big
OK: 4200 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 2e3e234
Reports root/ big
OK: 4225 / Failed: 1 / User-skipped: 97 / Auto-skipped: 0

pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription
{error,
  {{badmatch,
     [{xmlel,<<"message">>,
        [{<<"from">>,
        <<"alice_unsubscribe_after_presence_unsubscription_2600@localhost">>},
         {<<"to">>,
        <<"bob_unsubscribe_after_presence_unsubscription_2600@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"ZEVA3Gg9Kn7IcrrvSz9yag==">>}],
            [{xmlel,<<"item">>,
               [{<<"id">>,<<"salmon">>}],
               [{xmlel,<<"entry">>,
                  [{<<"xmlns">>,
                  <<"http://www.w3.org/2005/Atom">>}],
                  []}]}]}]},
         {xmlel,<<"headers">>,
           [{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
           []}]}]},
   [{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
      [{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
       {line,384}]},
    {escalus_story,story,4,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
       {line,72}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1291}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1223}]}]}}

Report log


riak_mnesia_24 / riak_mnesia / 2e3e234
Reports root/ big
OK: 2304 / Failed: 0 / User-skipped: 609 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 2e3e234
Reports root/ big
OK: 4214 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0

@mongoose-im
Copy link
Collaborator

mongoose-im commented Sep 22, 2022

small_tests_24 / small_tests / 33b5d9c
Reports root / small


small_tests_25 / small_tests / 33b5d9c
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 33b5d9c
Reports root/ big
OK: 3840 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 33b5d9c
Reports root/ big
OK: 2003 / Failed: 0 / User-skipped: 743 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 33b5d9c
Reports root/ big
OK: 2003 / Failed: 0 / User-skipped: 743 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 33b5d9c
Reports root/ big
OK: 3840 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 33b5d9c
Reports root/ big
OK: 3814 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 33b5d9c
Reports root/ big
OK: 3840 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 33b5d9c
Reports root/ big
OK: 4214 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 33b5d9c
Reports root/ big
OK: 2124 / Failed: 0 / User-skipped: 622 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 33b5d9c
Reports root/ big
OK: 2464 / Failed: 0 / User-skipped: 617 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 33b5d9c
Reports root/ big
OK: 4214 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 33b5d9c
Reports root/ big
OK: 4200 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 33b5d9c
Reports root/ big
OK: 4214 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 33b5d9c
Reports root/ big
OK: 2304 / Failed: 0 / User-skipped: 609 / Auto-skipped: 0

Cover the unlikely case of an invalid domain name.
@mongoose-im
Copy link
Collaborator

mongoose-im commented Sep 22, 2022

small_tests_24 / small_tests / 9082e6e
Reports root / small


small_tests_25 / small_tests / 9082e6e
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 9082e6e
Reports root/ big
OK: 3842 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 9082e6e
Reports root/ big
OK: 2003 / Failed: 0 / User-skipped: 745 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 9082e6e
Reports root/ big
OK: 3842 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 9082e6e
Reports root/ big
OK: 2003 / Failed: 0 / User-skipped: 745 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 9082e6e
Reports root/ big
OK: 2124 / Failed: 0 / User-skipped: 624 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 9082e6e
Reports root/ big
OK: 4216 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 9082e6e
Reports root/ big
OK: 2464 / Failed: 0 / User-skipped: 619 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 9082e6e
Reports root/ big
OK: 3842 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 9082e6e
Reports root/ big
OK: 3822 / Failed: 1 / User-skipped: 114 / Auto-skipped: 0

mod_ping_SUITE:server_ping_kill:active_keep_alive
{error,{{badrpc,timeout},
    [{escalus_rpc,call_with_cookie_match,
            [mongooseim@localhost,ejabberd_admin,register,
             [<<"alicE_active_keep_alive_2087">>,
            <<"domain.example.com">>,<<"matygrysa">>],
             3000,ejabberd],
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_rpc.erl"},
             {line,34}]},
     {lists,foreach_1,2,[{file,"lists.erl"},{line,1442}]},
     {escalus_ejabberd,create_users,2,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_ejabberd.erl"},
              {line,211}]},
     {escalus_fresh,create_users,2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_fresh.erl"},
             {line,62}]},
     {escalus_fresh,story,3,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_fresh.erl"},
             {line,27}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1291}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1223}]}]}}

Report log


pgsql_mnesia_25 / pgsql_mnesia / 9082e6e
Reports root/ big
OK: 4216 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 9082e6e
Reports root/ big
OK: 4205 / Failed: 1 / User-skipped: 111 / Auto-skipped: 0

mod_event_pusher_rabbit_SUITE:group_chat_message_publish:group_chat_message_received_event_properly_formatted
{error,
  {{assertMatch,
     [{module,mod_event_pusher_rabbit_SUITE},
      {line,422},
      {expression,
        "get_decoded_message_from_rabbit ( AliceGroupChatMsgRecvRK )"},
      {pattern,
        "# { << \"from_user_id\" >> := BobRoomJID , << \"to_user_id\" >> := AliceFullJID , << \"message\" >> := Message }"},
      {value,
        #{<<"from_user_id">> => <<"[email protected]">>,
        <<"message">> => <<>>,
        <<"to_user_id">> =>
          <<"alice_unnamed_2058@localhost/res1">>}}]},
   [{mod_event_pusher_rabbit_SUITE,
      '-group_chat_message_received_event_properly_formatted/1-fun-1-',3,
      [{file,
         "/home/circleci/project/big_tests/tests/mod_event_pusher_rabbit_SUITE.erl"},
       {line,422}]},
    {escalus_story,story,4,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
       {line,72}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1291}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1223}]}]}}

Report log


mssql_mnesia_25 / odbc_mssql_mnesia / 9082e6e
Reports root/ big
OK: 4214 / Failed: 2 / User-skipped: 97 / Auto-skipped: 0

push_integration_SUITE:pubsub_ful:pm_notifications_with_inbox:inbox_msg_unread_count_apns
{error,
  {{assertMatch,
     [{module,push_integration_SUITE},
      {line,662},
      {expression,"Data"},
      {pattern,"# { << \"message-count\" >> := ExpectedCount }"},
      {value,
        #{<<"last-message-body">> => <<"Private message">>,
        <<"last-message-sender">> =>
          <<"alice_inbox_msg_unread_count_apns_2739@localhost">>,
        <<"message-count">> => 1}}]},
   [{push_integration_SUITE,check_notification,2,
      [{file,
         "/home/circleci/project/big_tests/tests/push_integration_SUITE.erl"},
       {line,662}]},
    {push_integration_SUITE,'-inbox_msg_unread_count/3-fun-0-',6,
      [{file,
         "/home/circleci/project/big_tests/tests/push_integration_SUITE.erl"},
       {line,578}]},
    {escalus_story,story,4,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
       {line,72}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1291}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1223}]}]}}

Report log

rest_client_SUITE:roster:add_contact_and_invite
{error,{{badmatch,{{<<"500">>,<<"Internal Server Error">>},<<>>}},
    [{rest_client_SUITE,add_contact_check_roster_push,2,
              [{file,"/home/circleci/project/big_tests/tests/rest_client_SUITE.erl"},
               {line,1304}]},
     {rest_client_SUITE,'-add_contact_and_invite/1-fun-0-',2,
              [{file,"/home/circleci/project/big_tests/tests/rest_client_SUITE.erl"},
               {line,1085}]},
     {escalus_story,story,4,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {rest_client_SUITE,add_contact_and_invite,1,
              [{file,"/home/circleci/project/big_tests/tests/rest_client_SUITE.erl"},
               {line,1074}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1291}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1223}]}]}}

Report log


riak_mnesia_24 / riak_mnesia / 9082e6e
Reports root/ big
OK: 2304 / Failed: 0 / User-skipped: 611 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 9082e6e
Reports root/ big
OK: 4227 / Failed: 1 / User-skipped: 97 / Auto-skipped: 0

pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription
{error,
  {{badmatch,
     [{xmlel,<<"message">>,
        [{<<"from">>,
        <<"alice_unsubscribe_after_presence_unsubscription_2492@localhost">>},
         {<<"to">>,
        <<"bob_unsubscribe_after_presence_unsubscription_2492@localhost/res1">>},
         {<<"type">>,<<"headline">>}],
        [{xmlel,<<"event">>,
           [{<<"xmlns">>,
           <<"http://jabber.org/protocol/pubsub#event">>}],
           [{xmlel,<<"items">>,
            [{<<"node">>,<<"jug+UMGS0zuZkupYa7MUZA==">>}],
            [{xmlel,<<"item">>,
               [{<<"id">>,<<"salmon">>}],
               [{xmlel,<<"entry">>,
                  [{<<"xmlns">>,
                  <<"http://www.w3.org/2005/Atom">>}],
                  []}]}]}]},
         {xmlel,<<"headers">>,
           [{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
           []}]}]},
   [{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
      [{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
       {line,384}]},
    {escalus_story,story,4,
      [{file,
         "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
       {line,72}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1291}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1223}]}]}}

Report log

@chrzaszcz chrzaszcz marked this pull request as ready for review September 22, 2022 11:01
{[{{binary(), binary(), '*'}, atom()}], req(), state()}.
content_types_accepted(Req, State) ->
{[
{{<<"application">>, <<"json">>, '*'}, from_json}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to write it in one line?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is like this in all API modules, and I think it is more readable this way (multiple nested tuples).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

{[{{binary(), binary(), '*'}, atom()}], req(), state()}.
content_types_provided(Req, State) ->
{[
{{<<"application">>, <<"json">>, '*'}, to_json}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to write it in one line?

Copy link
Contributor

@JanuszJakubiec JanuszJakubiec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I've added some minor suggestions.

@JanuszJakubiec JanuszJakubiec merged commit 222c6e5 into feature/unified-rest-api Sep 22, 2022
@JanuszJakubiec JanuszJakubiec deleted the unified-rest-api-domain branch September 22, 2022 12:02
Copy link
Contributor

@arcusfelis arcusfelis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@chrzaszcz chrzaszcz added this to the 6.0.0 milestone Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants