Parcourir la source

chore: correct api examples

follow https://github.com/emqx/emqx/pull/10114
JianBo He il y a 3 ans
Parent
commit
d1689f6957

+ 3 - 6
lib-ee/emqx_ee_bridge/src/emqx_ee_bridge_cassa.erl

@@ -43,9 +43,8 @@ conn_bridge_examples(Method) ->
         }
     ].
 
-values(get, Type) ->
-    maps:merge(values(post, Type), ?METRICS_EXAMPLE);
-values(post, Type) ->
+%% no difference in get/post/put method
+values(_Method, Type) ->
     #{
         enable => true,
         type => Type,
@@ -66,9 +65,7 @@ values(post, Type) ->
             query_mode => sync,
             max_queue_bytes => ?DEFAULT_QUEUE_SIZE
         }
-    };
-values(put, Type) ->
-    values(post, Type).
+    }.
 
 %%--------------------------------------------------------------------
 %% schema

+ 0 - 2
lib-ee/emqx_ee_bridge/test/emqx_ee_bridge_cassa_SUITE.erl

@@ -294,8 +294,6 @@ connect_direct_cassa(Config) ->
 
 % These funs connect and then stop the cassandra connection
 connect_and_create_table(Config) ->
-    %% XXX: drop first
-    _ = connect_and_drop_table(Config),
     Con = connect_direct_cassa(Config),
     {ok, _} = ecql:query(Con, ?SQL_CREATE_TABLE),
     ok = ecql:close(Con).