Przeglądaj źródła

chore: update tests

JianBo He 1 rok temu
rodzic
commit
fafcc1b0b5
1 zmienionych plików z 3 dodań i 8 usunięć
  1. 3 8
      apps/emqx_audit/test/emqx_audit_api_SUITE.erl

+ 3 - 8
apps/emqx_audit/test/emqx_audit_api_SUITE.erl

@@ -94,12 +94,7 @@ t_http_api(_) ->
                     <<"operation_id">> := <<"/configs/global_zone">>,
                     <<"source_ip">> := <<"127.0.0.1">>,
                     <<"source">> := _,
-                    <<"http_request">> := #{
-                        <<"method">> := <<"put">>,
-                        <<"body">> := #{<<"mqtt">> := #{<<"max_qos_allowed">> := 1}},
-                        <<"bindings">> := _,
-                        <<"headers">> := #{<<"authorization">> := <<"******">>}
-                    },
+                    <<"http_request">> := _,
                     <<"http_status_code">> := 200,
                     <<"operation_result">> := <<"success">>,
                     <<"operation_type">> := <<"configs">>
@@ -166,7 +161,7 @@ t_cli(_Config) ->
                 <<"operation_id">> := <<"">>,
                 <<"source_ip">> := <<"">>,
                 <<"operation_type">> := <<"conf">>,
-                <<"args">> := [<<"show">>, <<"log">>],
+                <<"args">> := <<"[<<\"show\">>,<<\"log\">>]">>,
                 <<"node">> := _,
                 <<"source">> := <<"">>,
                 <<"http_request">> := <<"">>
@@ -184,7 +179,7 @@ t_cli(_Config) ->
     {ok, Res1} = emqx_mgmt_api_test_util:request_api(get, AuditPath, "from=cli", AuthHeader),
     #{<<"data">> := Data1} = emqx_utils_json:decode(Res1, [return_maps]),
     ?assertMatch(
-        [ShowLogEntry, #{<<"operation_type">> := <<"emqx">>, <<"args">> := [<<"start">>]}],
+        [ShowLogEntry, #{<<"operation_type">> := <<"emqx">>, <<"args">> := <<"[<<\"start\">>]">>}],
         Data1
     ),
     {ok, Res2} = emqx_mgmt_api_test_util:request_api(