Merge pull request #11280 from thalesmg/unhide-gcp-consumer-master-20230717

chore(gcp_pubsub_consumer): unhide GCP PubSub Consumer bridge for e5.2.0
This commit is contained in:
Thales Macedo Garitezi 2023-07-19 10:26:42 -03:00 committed by GitHub
commit 41b780f7f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 15 deletions

View File

@ -20,8 +20,7 @@ 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"),
%% TODO: un-hide for e5.2.0...
%% api_ref(emqx_bridge_gcp_pubsub, <<"gcp_pubsub_consumer">>, Method ++ "_consumer"),
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.
@ -267,7 +266,6 @@ gcp_pubsub_structs() ->
hoconsc:map(name, ref(emqx_bridge_gcp_pubsub, "config_consumer")),
#{
desc => <<"EMQX Enterprise Config">>,
importance => ?IMPORTANCE_HIDDEN,
required => false
}
)}

View File

@ -902,16 +902,15 @@ t_consume_ok(Config) ->
?assertEqual(3, emqx_resource_metrics:received_get(ResourceId))
),
%% 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),
%% 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),
?block_until(
@ -1027,8 +1026,8 @@ t_on_get_status(Config) ->
?assertMatch({ok, connecting}, emqx_resource_manager:health_check(ResourceId)),
ok.
t_create_via_http_api(_Config) ->
ct:comment("FIXME: implement after API specs are un-hidden in e5.2.0..."),
t_create_update_via_http_api(Config) ->
emqx_bridge_testlib:t_create_via_http(Config),
ok.
t_multiple_topic_mappings(Config) ->