Merge pull request #12147 from zhongwencool/bridge-description

fix:add descriptions fields to bridge_v1
This commit is contained in:
zhongwencool 2023-12-13 09:13:17 +08:00 committed by GitHub
commit 3c43db2828
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -124,7 +124,10 @@ common_bridge_fields() ->
desc => ?DESC("desc_enable"),
default => true
}
)}
)},
%% Create v2 connector then usr v1 /bridges_probe api to test connector
%% /bridges_probe should pass through v2 connector's description.
{description, emqx_schema:description_schema()}
].
status_fields() ->

View File

@ -1047,6 +1047,13 @@ t_bridges_probe(Config) ->
?HTTP_BRIDGE(URL),
Config
),
%% with descriptions is ok.
{ok, 204, <<>>} = request(
post,
uri(["bridges_probe"]),
(?HTTP_BRIDGE(URL))#{<<"description">> => <<"Test Description">>},
Config
),
?assertMatch(
{ok, 400, #{