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:
commit
41b780f7f2
|
@ -20,8 +20,7 @@ api_schemas(Method) ->
|
||||||
%% We need to map the `type' field of a request (binary) to a
|
%% We need to map the `type' field of a request (binary) to a
|
||||||
%% bridge schema module.
|
%% bridge schema module.
|
||||||
api_ref(emqx_bridge_gcp_pubsub, <<"gcp_pubsub">>, Method ++ "_producer"),
|
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"),
|
api_ref(emqx_bridge_kafka, <<"kafka_consumer">>, Method ++ "_consumer"),
|
||||||
%% TODO: rename this to `kafka_producer' after alias support is added
|
%% TODO: rename this to `kafka_producer' after alias support is added
|
||||||
%% to hocon; keeping this as just `kafka' for backwards compatibility.
|
%% 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")),
|
hoconsc:map(name, ref(emqx_bridge_gcp_pubsub, "config_consumer")),
|
||||||
#{
|
#{
|
||||||
desc => <<"EMQX Enterprise Config">>,
|
desc => <<"EMQX Enterprise Config">>,
|
||||||
importance => ?IMPORTANCE_HIDDEN,
|
|
||||||
required => false
|
required => false
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -902,16 +902,15 @@ t_consume_ok(Config) ->
|
||||||
?assertEqual(3, emqx_resource_metrics:received_get(ResourceId))
|
?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.
|
||||||
%% %% Check that the bridge probe API doesn't leak atoms.
|
ProbeRes0 = probe_bridge_api(Config),
|
||||||
%% ProbeRes0 = probe_bridge_api(Config),
|
?assertMatch({ok, {{_, 204, _}, _Headers, _Body}}, ProbeRes0),
|
||||||
%% ?assertMatch({ok, {{_, 204, _}, _Headers, _Body}}, ProbeRes0),
|
AtomsBefore = erlang:system_info(atom_count),
|
||||||
%% AtomsBefore = erlang:system_info(atom_count),
|
%% Probe again; shouldn't have created more atoms.
|
||||||
%% %% Probe again; shouldn't have created more atoms.
|
ProbeRes1 = probe_bridge_api(Config),
|
||||||
%% ProbeRes1 = probe_bridge_api(Config),
|
?assertMatch({ok, {{_, 204, _}, _Headers, _Body}}, ProbeRes1),
|
||||||
%% ?assertMatch({ok, {{_, 204, _}, _Headers, _Body}}, ProbeRes1),
|
AtomsAfter = erlang:system_info(atom_count),
|
||||||
%% AtomsAfter = erlang:system_info(atom_count),
|
?assertEqual(AtomsBefore, AtomsAfter),
|
||||||
%% ?assertEqual(AtomsBefore, AtomsAfter),
|
|
||||||
|
|
||||||
assert_non_received_metrics(BridgeName),
|
assert_non_received_metrics(BridgeName),
|
||||||
?block_until(
|
?block_until(
|
||||||
|
@ -1027,8 +1026,8 @@ t_on_get_status(Config) ->
|
||||||
?assertMatch({ok, connecting}, emqx_resource_manager:health_check(ResourceId)),
|
?assertMatch({ok, connecting}, emqx_resource_manager:health_check(ResourceId)),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
t_create_via_http_api(_Config) ->
|
t_create_update_via_http_api(Config) ->
|
||||||
ct:comment("FIXME: implement after API specs are un-hidden in e5.2.0..."),
|
emqx_bridge_testlib:t_create_via_http(Config),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
t_multiple_topic_mappings(Config) ->
|
t_multiple_topic_mappings(Config) ->
|
||||||
|
|
Loading…
Reference in New Issue