test: fix cert file match

This commit is contained in:
Zaiming (Stone) Shi 2022-04-19 09:47:18 +02:00
parent c71302ae27
commit dccb1df3eb
1 changed files with 6 additions and 9 deletions

View File

@ -94,9 +94,6 @@
>> >>
}). }).
-define(MATCH_RSA_KEY, <<"-----BEGIN RSA PRIVATE KEY", _/binary>>).
-define(MATCH_CERT, <<"-----BEGIN CERTIFICATE", _/binary>>).
all() -> all() ->
emqx_common_test_helpers:all(?MODULE). emqx_common_test_helpers:all(?MODULE).
@ -279,9 +276,9 @@ t_api(_) ->
<<"type">> := <<"mongodb">>, <<"type">> := <<"mongodb">>,
<<"ssl">> := #{ <<"ssl">> := #{
<<"enable">> := <<"true">>, <<"enable">> := <<"true">>,
<<"cacertfile">> := ?MATCH_CERT, <<"cacertfile">> := _,
<<"certfile">> := ?MATCH_CERT, <<"certfile">> := _,
<<"keyfile">> := ?MATCH_RSA_KEY, <<"keyfile">> := _,
<<"verify">> := <<"verify_none">> <<"verify">> := <<"verify_none">>
} }
}, },
@ -313,9 +310,9 @@ t_api(_) ->
<<"type">> := <<"mongodb">>, <<"type">> := <<"mongodb">>,
<<"ssl">> := #{ <<"ssl">> := #{
<<"enable">> := <<"true">>, <<"enable">> := <<"true">>,
<<"cacertfile">> := ?MATCH_CERT, <<"cacertfile">> := _,
<<"certfile">> := ?MATCH_CERT, <<"certfile">> := _,
<<"keyfile">> := ?MATCH_RSA_KEY, <<"keyfile">> := _,
<<"verify">> := <<"verify_none">> <<"verify">> := <<"verify_none">>
} }
}, },