chore: change triple-quotes to single-quotes

This commit is contained in:
Zaiming (Stone) Shi 2023-11-29 10:46:22 +01:00
parent e6eb97e104
commit 14644988e0
11 changed files with 38 additions and 38 deletions

View File

@ -126,7 +126,7 @@ check(Conf) when is_map(Conf) ->
%% erlfmt-ignore
%% this is config generated from v5.0.11
webhook_v5011_hocon() ->
"""
"
bridges{
webhook {
the_name{
@ -143,7 +143,7 @@ bridges{
}
}
}
""".
".
full_webhook_v5011_hocon() ->
""
@ -215,7 +215,7 @@ full_webhook_v5019_hocon() ->
%% erlfmt-ignore
%% this is a generated from v5.0.11
mqtt_v5011_hocon() ->
"""
"
bridges {
mqtt {
bridge_one {
@ -257,12 +257,12 @@ bridges {
}
}
}
""".
".
%% erlfmt-ignore
%% a more complete version
mqtt_v5011_full_hocon() ->
"""
"
bridges {
mqtt {
bridge_one {
@ -330,4 +330,4 @@ bridges {
}
}
}
""".
".

View File

@ -12,7 +12,7 @@
%% erlfmt-ignore
aeh_producer_hocon() ->
"""
"
bridges.azure_event_hub_producer.my_producer {
enable = true
authentication {
@ -62,7 +62,7 @@ bridges.azure_event_hub_producer.my_producer {
server_name_indication = auto
}
}
""".
".
%%===========================================================================
%% Helper functions

View File

@ -12,7 +12,7 @@
%% erlfmt-ignore
confluent_producer_action_hocon() ->
"""
"
actions.confluent_producer.my_producer {
enable = true
connector = my_connector
@ -40,7 +40,7 @@ actions.confluent_producer.my_producer {
}
local_topic = \"t/confluent\"
}
""".
".
confluent_producer_connector_hocon() ->
""

View File

@ -12,7 +12,7 @@
%% erlfmt-ignore
gcp_pubsub_producer_hocon() ->
"""
"
bridges.gcp_pubsub.my_producer {
attributes_template = [
{key = \"${payload.key}\", value = fixed_value}
@ -54,7 +54,7 @@ bridges.gcp_pubsub.my_producer {
type = service_account
}
}
""".
".
%%===========================================================================
%% Helper functions

View File

@ -175,7 +175,7 @@ check_atom_key(Conf) when is_map(Conf) ->
%% erlfmt-ignore
webhook_config_hocon() ->
"""
"
bridges.webhook.a {
body = \"${.}\"
connect_timeout = 15s
@ -209,4 +209,4 @@ bridges.webhook.a {
}
url = \"http://some.host:4000/api/echo\"
}
""".
".

View File

@ -73,7 +73,7 @@ check_atom_key(Conf) when is_map(Conf) ->
%% erlfmt-ignore
pulsar_producer_hocon() ->
"""
"
bridges.pulsar_producer.my_producer {
enable = true
servers = \"localhost:6650\"
@ -90,4 +90,4 @@ bridges.pulsar_producer.my_producer {
server_name_indication = \"auto\"
}
}
""".
".

View File

@ -24,7 +24,7 @@
%% erlfmt-ignore
-define(BASE_CONF,
"""
"
log {
console {
enable = true
@ -36,7 +36,7 @@
path = \"log/emqx.log\"
}
}
""").
").
all() ->
emqx_common_test_helpers:all(?MODULE).

View File

@ -20,7 +20,7 @@
%% erlfmt-ignore
-define(BASE_CONF,
"""
"
node {
name = \"emqx1@127.0.0.1\"
cookie = \"emqxsecretcookie\"
@ -34,7 +34,7 @@
static.seeds = ~p
core_nodes = ~p
}
""").
").
array_nodes_test() ->
ensure_acl_conf(),
@ -70,7 +70,7 @@ array_nodes_test() ->
%% erlfmt-ignore
-define(OUTDATED_LOG_CONF,
"""
"
log.console_handler {
burst_limit {
enable = true
@ -124,7 +124,7 @@ log.file_handlers {
time_offset = \"+01:00\"
}
}
"""
"
).
-define(FORMATTER(TimeOffset),
{emqx_logger_textfmt, #{
@ -196,7 +196,7 @@ validate_log(Conf) ->
%% erlfmt-ignore
-define(FILE_LOG_BASE_CONF,
"""
"
log.file.default {
enable = true
file = \"log/xx-emqx.log\"
@ -206,7 +206,7 @@ validate_log(Conf) ->
rotation_size = ~s
time_offset = \"+01:00\"
}
"""
"
).
file_log_infinity_rotation_size_test_() ->
@ -249,7 +249,7 @@ file_log_infinity_rotation_size_test_() ->
%% erlfmt-ignore
-define(KERNEL_LOG_CONF,
"""
"
log.console {
enable = true
formatter = text
@ -269,7 +269,7 @@ file_log_infinity_rotation_size_test_() ->
enable = true
file = \"log/my-emqx.log\"
}
"""
"
).
log_test() ->
@ -279,7 +279,7 @@ log_test() ->
log_rotation_count_limit_test() ->
ensure_acl_conf(),
Format =
"""
"
log.file {
enable = true
path = \"log/emqx.log\"
@ -288,7 +288,7 @@ log_rotation_count_limit_test() ->
rotation = {count = ~w}
rotation_size = \"1024MB\"
}
""",
",
BaseConf = to_bin(?BASE_CONF, ["emqx1@127.0.0.1", "emqx1@127.0.0.1"]),
lists:foreach(fun({Conf, Count}) ->
Conf0 = <<BaseConf/binary, Conf/binary>>,
@ -320,7 +320,7 @@ log_rotation_count_limit_test() ->
%% erlfmt-ignore
-define(BASE_AUTHN_ARRAY,
"""
"
authentication = [
{backend = \"http\"
body {password = \"${password}\", username = \"${username}\"}
@ -335,7 +335,7 @@ log_rotation_count_limit_test() ->
url = \"~ts\"
}
]
"""
"
).
-define(ERROR(Error),
@ -396,13 +396,13 @@ authn_validations_test() ->
%% erlfmt-ignore
-define(LISTENERS,
"""
"
listeners.ssl.default.bind = 9999
listeners.wss.default.bind = 9998
listeners.wss.default.ssl_options.cacertfile = \"mytest/certs/cacert.pem\"
listeners.wss.new.bind = 9997
listeners.wss.new.websocket.mqtt_path = \"/my-mqtt\"
"""
"
).
listeners_test() ->

View File

@ -57,7 +57,7 @@
%% erlfmt-ignore
-define(SYSMON_EXAMPLE,
<<"""
<<"
sysmon {
os {
cpu_check_interval = 60s
@ -78,7 +78,7 @@
process_low_watermark = 60%
}
}
""">>
">>
).
api_spec() ->

View File

@ -134,7 +134,7 @@ check(Conf) when is_map(Conf) ->
%% erlfmt-ignore
webhook_bridge_health_check_hocon(HealthCheckInterval) ->
io_lib:format(
"""
"
bridges.webhook.simple {
url = \"http://localhost:4000\"
body = \"body\"
@ -142,5 +142,5 @@ bridges.webhook.simple {
health_check_interval = \"~s\"
}
}
""",
",
[HealthCheckInterval]).

View File

@ -24,7 +24,7 @@
%% erlfmt-ignore
republish_hocon0() ->
"""
"
rule_engine.rules.my_rule {
description = \"some desc\"
metadata = {created_at = 1693918992079}
@ -55,7 +55,7 @@ rule_engine.rules.my_rule {
}
]
}
""".
".
%%===========================================================================
%% Helper functions