chore: hide gcp pubsub consumer until e5.2.0

This commit is contained in:
Thales Macedo Garitezi 2023-06-22 10:01:22 -03:00
parent f01de238b2
commit 22356b7c25
2 changed files with 14 additions and 10 deletions

View File

@ -581,15 +581,16 @@ t_consume_ok(Config) ->
?assertEqual(3, emqx_resource_metrics:received_get(ResourceId))
),
%% Check that the bridge probe API doesn't leak atoms.
ProbeRes0 = probe_bridge_api(Config),
?assertMatch({ok, {{_, 204, _}, _Headers, _Body}}, ProbeRes0),
AtomsBefore = erlang:system_info(atom_count),
%% Probe again; shouldn't have created more atoms.
ProbeRes1 = probe_bridge_api(Config),
?assertMatch({ok, {{_, 204, _}, _Headers, _Body}}, ProbeRes1),
AtomsAfter = erlang:system_info(atom_count),
?assertEqual(AtomsBefore, AtomsAfter),
%% FIXME: uncomment after API spec is un-hidden...
%% %% Check that the bridge probe API doesn't leak atoms.
%% ProbeRes0 = probe_bridge_api(Config),
%% ?assertMatch({ok, {{_, 204, _}, _Headers, _Body}}, ProbeRes0),
%% AtomsBefore = erlang:system_info(atom_count),
%% %% Probe again; shouldn't have created more atoms.
%% ProbeRes1 = probe_bridge_api(Config),
%% ?assertMatch({ok, {{_, 204, _}, _Headers, _Body}}, ProbeRes1),
%% AtomsAfter = erlang:system_info(atom_count),
%% ?assertEqual(AtomsBefore, AtomsAfter),
assert_non_received_metrics(BridgeName),

View File

@ -3,6 +3,7 @@
%%--------------------------------------------------------------------
-module(emqx_ee_bridge).
-include_lib("hocon/include/hoconsc.hrl").
-import(hoconsc, [mk/2, enum/1, ref/2]).
-export([
@ -17,7 +18,8 @@ api_schemas(Method) ->
%% We need to map the `type' field of a request (binary) to a
%% bridge schema module.
api_ref(emqx_bridge_gcp_pubsub, <<"gcp_pubsub">>, Method ++ "_producer"),
api_ref(emqx_bridge_gcp_pubsub, <<"gcp_pubsub_consumer">>, Method ++ "_consumer"),
%% TODO: un-hide for e5.2.0...
%% api_ref(emqx_bridge_gcp_pubsub, <<"gcp_pubsub_consumer">>, Method ++ "_consumer"),
api_ref(emqx_bridge_kafka, <<"kafka_consumer">>, Method ++ "_consumer"),
%% TODO: rename this to `kafka_producer' after alias support is added
%% to hocon; keeping this as just `kafka' for backwards compatibility.
@ -259,6 +261,7 @@ gcp_pubsub_structs() ->
hoconsc:map(name, ref(emqx_bridge_gcp_pubsub, "config_consumer")),
#{
desc => <<"EMQX Enterprise Config">>,
importance => ?IMPORTANCE_HIDDEN,
required => false
}
)}