chore: change triple-quotes to single-quotes
This commit is contained in:
parent
e6eb97e104
commit
14644988e0
|
@ -126,7 +126,7 @@ check(Conf) when is_map(Conf) ->
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
%% this is config generated from v5.0.11
|
%% this is config generated from v5.0.11
|
||||||
webhook_v5011_hocon() ->
|
webhook_v5011_hocon() ->
|
||||||
"""
|
"
|
||||||
bridges{
|
bridges{
|
||||||
webhook {
|
webhook {
|
||||||
the_name{
|
the_name{
|
||||||
|
@ -143,7 +143,7 @@ bridges{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""".
|
".
|
||||||
|
|
||||||
full_webhook_v5011_hocon() ->
|
full_webhook_v5011_hocon() ->
|
||||||
""
|
""
|
||||||
|
@ -215,7 +215,7 @@ full_webhook_v5019_hocon() ->
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
%% this is a generated from v5.0.11
|
%% this is a generated from v5.0.11
|
||||||
mqtt_v5011_hocon() ->
|
mqtt_v5011_hocon() ->
|
||||||
"""
|
"
|
||||||
bridges {
|
bridges {
|
||||||
mqtt {
|
mqtt {
|
||||||
bridge_one {
|
bridge_one {
|
||||||
|
@ -257,12 +257,12 @@ bridges {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""".
|
".
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
%% a more complete version
|
%% a more complete version
|
||||||
mqtt_v5011_full_hocon() ->
|
mqtt_v5011_full_hocon() ->
|
||||||
"""
|
"
|
||||||
bridges {
|
bridges {
|
||||||
mqtt {
|
mqtt {
|
||||||
bridge_one {
|
bridge_one {
|
||||||
|
@ -330,4 +330,4 @@ bridges {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""".
|
".
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
aeh_producer_hocon() ->
|
aeh_producer_hocon() ->
|
||||||
"""
|
"
|
||||||
bridges.azure_event_hub_producer.my_producer {
|
bridges.azure_event_hub_producer.my_producer {
|
||||||
enable = true
|
enable = true
|
||||||
authentication {
|
authentication {
|
||||||
|
@ -62,7 +62,7 @@ bridges.azure_event_hub_producer.my_producer {
|
||||||
server_name_indication = auto
|
server_name_indication = auto
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""".
|
".
|
||||||
|
|
||||||
%%===========================================================================
|
%%===========================================================================
|
||||||
%% Helper functions
|
%% Helper functions
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
confluent_producer_action_hocon() ->
|
confluent_producer_action_hocon() ->
|
||||||
"""
|
"
|
||||||
actions.confluent_producer.my_producer {
|
actions.confluent_producer.my_producer {
|
||||||
enable = true
|
enable = true
|
||||||
connector = my_connector
|
connector = my_connector
|
||||||
|
@ -40,7 +40,7 @@ actions.confluent_producer.my_producer {
|
||||||
}
|
}
|
||||||
local_topic = \"t/confluent\"
|
local_topic = \"t/confluent\"
|
||||||
}
|
}
|
||||||
""".
|
".
|
||||||
|
|
||||||
confluent_producer_connector_hocon() ->
|
confluent_producer_connector_hocon() ->
|
||||||
""
|
""
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
gcp_pubsub_producer_hocon() ->
|
gcp_pubsub_producer_hocon() ->
|
||||||
"""
|
"
|
||||||
bridges.gcp_pubsub.my_producer {
|
bridges.gcp_pubsub.my_producer {
|
||||||
attributes_template = [
|
attributes_template = [
|
||||||
{key = \"${payload.key}\", value = fixed_value}
|
{key = \"${payload.key}\", value = fixed_value}
|
||||||
|
@ -54,7 +54,7 @@ bridges.gcp_pubsub.my_producer {
|
||||||
type = service_account
|
type = service_account
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""".
|
".
|
||||||
|
|
||||||
%%===========================================================================
|
%%===========================================================================
|
||||||
%% Helper functions
|
%% Helper functions
|
||||||
|
|
|
@ -175,7 +175,7 @@ check_atom_key(Conf) when is_map(Conf) ->
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
webhook_config_hocon() ->
|
webhook_config_hocon() ->
|
||||||
"""
|
"
|
||||||
bridges.webhook.a {
|
bridges.webhook.a {
|
||||||
body = \"${.}\"
|
body = \"${.}\"
|
||||||
connect_timeout = 15s
|
connect_timeout = 15s
|
||||||
|
@ -209,4 +209,4 @@ bridges.webhook.a {
|
||||||
}
|
}
|
||||||
url = \"http://some.host:4000/api/echo\"
|
url = \"http://some.host:4000/api/echo\"
|
||||||
}
|
}
|
||||||
""".
|
".
|
||||||
|
|
|
@ -73,7 +73,7 @@ check_atom_key(Conf) when is_map(Conf) ->
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
pulsar_producer_hocon() ->
|
pulsar_producer_hocon() ->
|
||||||
"""
|
"
|
||||||
bridges.pulsar_producer.my_producer {
|
bridges.pulsar_producer.my_producer {
|
||||||
enable = true
|
enable = true
|
||||||
servers = \"localhost:6650\"
|
servers = \"localhost:6650\"
|
||||||
|
@ -90,4 +90,4 @@ bridges.pulsar_producer.my_producer {
|
||||||
server_name_indication = \"auto\"
|
server_name_indication = \"auto\"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""".
|
".
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
-define(BASE_CONF,
|
-define(BASE_CONF,
|
||||||
"""
|
"
|
||||||
log {
|
log {
|
||||||
console {
|
console {
|
||||||
enable = true
|
enable = true
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
path = \"log/emqx.log\"
|
path = \"log/emqx.log\"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""").
|
").
|
||||||
|
|
||||||
all() ->
|
all() ->
|
||||||
emqx_common_test_helpers:all(?MODULE).
|
emqx_common_test_helpers:all(?MODULE).
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
-define(BASE_CONF,
|
-define(BASE_CONF,
|
||||||
"""
|
"
|
||||||
node {
|
node {
|
||||||
name = \"emqx1@127.0.0.1\"
|
name = \"emqx1@127.0.0.1\"
|
||||||
cookie = \"emqxsecretcookie\"
|
cookie = \"emqxsecretcookie\"
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
static.seeds = ~p
|
static.seeds = ~p
|
||||||
core_nodes = ~p
|
core_nodes = ~p
|
||||||
}
|
}
|
||||||
""").
|
").
|
||||||
|
|
||||||
array_nodes_test() ->
|
array_nodes_test() ->
|
||||||
ensure_acl_conf(),
|
ensure_acl_conf(),
|
||||||
|
@ -70,7 +70,7 @@ array_nodes_test() ->
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
-define(OUTDATED_LOG_CONF,
|
-define(OUTDATED_LOG_CONF,
|
||||||
"""
|
"
|
||||||
log.console_handler {
|
log.console_handler {
|
||||||
burst_limit {
|
burst_limit {
|
||||||
enable = true
|
enable = true
|
||||||
|
@ -124,7 +124,7 @@ log.file_handlers {
|
||||||
time_offset = \"+01:00\"
|
time_offset = \"+01:00\"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"""
|
"
|
||||||
).
|
).
|
||||||
-define(FORMATTER(TimeOffset),
|
-define(FORMATTER(TimeOffset),
|
||||||
{emqx_logger_textfmt, #{
|
{emqx_logger_textfmt, #{
|
||||||
|
@ -196,7 +196,7 @@ validate_log(Conf) ->
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
-define(FILE_LOG_BASE_CONF,
|
-define(FILE_LOG_BASE_CONF,
|
||||||
"""
|
"
|
||||||
log.file.default {
|
log.file.default {
|
||||||
enable = true
|
enable = true
|
||||||
file = \"log/xx-emqx.log\"
|
file = \"log/xx-emqx.log\"
|
||||||
|
@ -206,7 +206,7 @@ validate_log(Conf) ->
|
||||||
rotation_size = ~s
|
rotation_size = ~s
|
||||||
time_offset = \"+01:00\"
|
time_offset = \"+01:00\"
|
||||||
}
|
}
|
||||||
"""
|
"
|
||||||
).
|
).
|
||||||
|
|
||||||
file_log_infinity_rotation_size_test_() ->
|
file_log_infinity_rotation_size_test_() ->
|
||||||
|
@ -249,7 +249,7 @@ file_log_infinity_rotation_size_test_() ->
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
-define(KERNEL_LOG_CONF,
|
-define(KERNEL_LOG_CONF,
|
||||||
"""
|
"
|
||||||
log.console {
|
log.console {
|
||||||
enable = true
|
enable = true
|
||||||
formatter = text
|
formatter = text
|
||||||
|
@ -269,7 +269,7 @@ file_log_infinity_rotation_size_test_() ->
|
||||||
enable = true
|
enable = true
|
||||||
file = \"log/my-emqx.log\"
|
file = \"log/my-emqx.log\"
|
||||||
}
|
}
|
||||||
"""
|
"
|
||||||
).
|
).
|
||||||
|
|
||||||
log_test() ->
|
log_test() ->
|
||||||
|
@ -279,7 +279,7 @@ log_test() ->
|
||||||
log_rotation_count_limit_test() ->
|
log_rotation_count_limit_test() ->
|
||||||
ensure_acl_conf(),
|
ensure_acl_conf(),
|
||||||
Format =
|
Format =
|
||||||
"""
|
"
|
||||||
log.file {
|
log.file {
|
||||||
enable = true
|
enable = true
|
||||||
path = \"log/emqx.log\"
|
path = \"log/emqx.log\"
|
||||||
|
@ -288,7 +288,7 @@ log_rotation_count_limit_test() ->
|
||||||
rotation = {count = ~w}
|
rotation = {count = ~w}
|
||||||
rotation_size = \"1024MB\"
|
rotation_size = \"1024MB\"
|
||||||
}
|
}
|
||||||
""",
|
",
|
||||||
BaseConf = to_bin(?BASE_CONF, ["emqx1@127.0.0.1", "emqx1@127.0.0.1"]),
|
BaseConf = to_bin(?BASE_CONF, ["emqx1@127.0.0.1", "emqx1@127.0.0.1"]),
|
||||||
lists:foreach(fun({Conf, Count}) ->
|
lists:foreach(fun({Conf, Count}) ->
|
||||||
Conf0 = <<BaseConf/binary, Conf/binary>>,
|
Conf0 = <<BaseConf/binary, Conf/binary>>,
|
||||||
|
@ -320,7 +320,7 @@ log_rotation_count_limit_test() ->
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
-define(BASE_AUTHN_ARRAY,
|
-define(BASE_AUTHN_ARRAY,
|
||||||
"""
|
"
|
||||||
authentication = [
|
authentication = [
|
||||||
{backend = \"http\"
|
{backend = \"http\"
|
||||||
body {password = \"${password}\", username = \"${username}\"}
|
body {password = \"${password}\", username = \"${username}\"}
|
||||||
|
@ -335,7 +335,7 @@ log_rotation_count_limit_test() ->
|
||||||
url = \"~ts\"
|
url = \"~ts\"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
"""
|
"
|
||||||
).
|
).
|
||||||
|
|
||||||
-define(ERROR(Error),
|
-define(ERROR(Error),
|
||||||
|
@ -396,13 +396,13 @@ authn_validations_test() ->
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
-define(LISTENERS,
|
-define(LISTENERS,
|
||||||
"""
|
"
|
||||||
listeners.ssl.default.bind = 9999
|
listeners.ssl.default.bind = 9999
|
||||||
listeners.wss.default.bind = 9998
|
listeners.wss.default.bind = 9998
|
||||||
listeners.wss.default.ssl_options.cacertfile = \"mytest/certs/cacert.pem\"
|
listeners.wss.default.ssl_options.cacertfile = \"mytest/certs/cacert.pem\"
|
||||||
listeners.wss.new.bind = 9997
|
listeners.wss.new.bind = 9997
|
||||||
listeners.wss.new.websocket.mqtt_path = \"/my-mqtt\"
|
listeners.wss.new.websocket.mqtt_path = \"/my-mqtt\"
|
||||||
"""
|
"
|
||||||
).
|
).
|
||||||
|
|
||||||
listeners_test() ->
|
listeners_test() ->
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
-define(SYSMON_EXAMPLE,
|
-define(SYSMON_EXAMPLE,
|
||||||
<<"""
|
<<"
|
||||||
sysmon {
|
sysmon {
|
||||||
os {
|
os {
|
||||||
cpu_check_interval = 60s
|
cpu_check_interval = 60s
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
process_low_watermark = 60%
|
process_low_watermark = 60%
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""">>
|
">>
|
||||||
).
|
).
|
||||||
|
|
||||||
api_spec() ->
|
api_spec() ->
|
||||||
|
|
|
@ -134,7 +134,7 @@ check(Conf) when is_map(Conf) ->
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
webhook_bridge_health_check_hocon(HealthCheckInterval) ->
|
webhook_bridge_health_check_hocon(HealthCheckInterval) ->
|
||||||
io_lib:format(
|
io_lib:format(
|
||||||
"""
|
"
|
||||||
bridges.webhook.simple {
|
bridges.webhook.simple {
|
||||||
url = \"http://localhost:4000\"
|
url = \"http://localhost:4000\"
|
||||||
body = \"body\"
|
body = \"body\"
|
||||||
|
@ -142,5 +142,5 @@ bridges.webhook.simple {
|
||||||
health_check_interval = \"~s\"
|
health_check_interval = \"~s\"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""",
|
",
|
||||||
[HealthCheckInterval]).
|
[HealthCheckInterval]).
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
%% erlfmt-ignore
|
%% erlfmt-ignore
|
||||||
republish_hocon0() ->
|
republish_hocon0() ->
|
||||||
"""
|
"
|
||||||
rule_engine.rules.my_rule {
|
rule_engine.rules.my_rule {
|
||||||
description = \"some desc\"
|
description = \"some desc\"
|
||||||
metadata = {created_at = 1693918992079}
|
metadata = {created_at = 1693918992079}
|
||||||
|
@ -55,7 +55,7 @@ rule_engine.rules.my_rule {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
""".
|
".
|
||||||
|
|
||||||
%%===========================================================================
|
%%===========================================================================
|
||||||
%% Helper functions
|
%% Helper functions
|
||||||
|
|
Loading…
Reference in New Issue