Przeglądaj źródła

fix(test): rule engine api SUITE , bad rule name

DDDHuang 3 lat temu
rodzic
commit
5210cd6e8d

+ 2 - 1
apps/emqx_rule_engine/test/emqx_rule_engine_api_SUITE.erl

@@ -34,7 +34,8 @@ t_crud_rule_api(_Config) ->
         <<"enable">> => true,
         <<"enable">> => true,
         <<"id">> => RuleID,
         <<"id">> => RuleID,
         <<"outputs">> => [#{<<"function">> => <<"console">>}],
         <<"outputs">> => [#{<<"function">> => <<"console">>}],
-        <<"sql">> => <<"SELECT * from \"t/1\"">>
+        <<"sql">> => <<"SELECT * from \"t/1\"">>,
+        <<"name">> => <<"test_rule">>
     },
     },
     {201, Rule} = emqx_rule_engine_api:'/rules'(post, #{body => Params0}),
     {201, Rule} = emqx_rule_engine_api:'/rules'(post, #{body => Params0}),
     %% if we post again with the same params, it return with 400 "rule id already exists"
     %% if we post again with the same params, it return with 400 "rule id already exists"