test: (re-)add inconsistent connector test
This commit is contained in:
parent
0ad156bfa9
commit
1816b450f0
|
@ -517,44 +517,42 @@ do_start_stop_connectors(TestType, Config) ->
|
||||||
ok = gen_tcp:close(Sock),
|
ok = gen_tcp:close(Sock),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
%% t_start_stop_inconsistent_bridge_node(Config) ->
|
t_start_stop_inconsistent_connector_node(Config) ->
|
||||||
%% start_stop_inconsistent_bridge(node, Config).
|
start_stop_inconsistent_connector(node, Config).
|
||||||
|
|
||||||
%% t_start_stop_inconsistent_bridge_cluster(Config) ->
|
t_start_stop_inconsistent_connector_cluster(Config) ->
|
||||||
%% start_stop_inconsistent_bridge(cluster, Config).
|
start_stop_inconsistent_connector(cluster, Config).
|
||||||
|
|
||||||
%% start_stop_inconsistent_bridge(Type, Config) ->
|
start_stop_inconsistent_connector(Type, Config) ->
|
||||||
%% Port = ?config(port, Config),
|
Node = ?config(node, Config),
|
||||||
%% URL = ?URL(Port, "abc"),
|
|
||||||
%% Node = ?config(node, Config),
|
|
||||||
|
|
||||||
%% erpc:call(Node, fun() ->
|
erpc:call(Node, fun() ->
|
||||||
%% meck:new(emqx_bridge_resource, [passthrough, no_link]),
|
meck:new(emqx_connector_resource, [passthrough, no_link]),
|
||||||
%% meck:expect(
|
meck:expect(
|
||||||
%% emqx_bridge_resource,
|
emqx_connector_resource,
|
||||||
%% stop,
|
stop,
|
||||||
%% fun
|
fun
|
||||||
%% (_, <<"bridge_not_found">>) -> {error, not_found};
|
(_, <<"connector_not_found">>) -> {error, not_found};
|
||||||
%% (BridgeType, Name) -> meck:passthrough([BridgeType, Name])
|
(ConnectorType, Name) -> meck:passthrough([ConnectorType, Name])
|
||||||
%% end
|
end
|
||||||
%% )
|
)
|
||||||
%% end),
|
end),
|
||||||
|
|
||||||
%% emqx_common_test_helpers:on_exit(fun() ->
|
emqx_common_test_helpers:on_exit(fun() ->
|
||||||
%% erpc:call(Node, fun() ->
|
erpc:call(Node, fun() ->
|
||||||
%% meck:unload([emqx_bridge_resource])
|
meck:unload([emqx_connector_resource])
|
||||||
%% end)
|
end)
|
||||||
%% end),
|
end),
|
||||||
|
|
||||||
%% {ok, 201, _Bridge} = request(
|
{ok, 201, _Connector} = request(
|
||||||
%% post,
|
post,
|
||||||
%% uri(["bridges"]),
|
uri(["connectors"]),
|
||||||
%% ?HTTP_BRIDGE(URL, <<"bridge_not_found">>),
|
?KAFKA_CONNECTOR(<<"connector_not_found">>),
|
||||||
%% Config
|
Config
|
||||||
%% ),
|
),
|
||||||
%% {ok, 503, _} = request(
|
{ok, 503, _} = request(
|
||||||
%% post, {operation, Type, stop, <<"webhook:bridge_not_found">>}, Config
|
post, {operation, Type, stop, <<"kafka:connector_not_found">>}, Config
|
||||||
%% ).
|
).
|
||||||
|
|
||||||
t_enable_disable_connectors(Config) ->
|
t_enable_disable_connectors(Config) ->
|
||||||
%% assert we there's no connectors at first
|
%% assert we there's no connectors at first
|
||||||
|
|
Loading…
Reference in New Issue