Browse Source

fix: don't require ssl conf

Stefan Strigler 3 years ago
parent
commit
d164e5bc0f

+ 3 - 1
apps/emqx_bridge/src/emqx_bridge_resource.erl

@@ -251,7 +251,9 @@ maybe_clear_certs(TmpPath, #{ssl := SslConf} = Conf) ->
     case is_tmp_path_conf(TmpPath, SslConf) of
         true -> emqx_connector_ssl:clear_certs(TmpPath, Conf);
         false -> ok
-    end.
+    end;
+maybe_clear_certs(_TmpPath, _ConfWithoutSsl) ->
+    ok.
 
 is_tmp_path_conf(TmpPath, #{certfile := Certfile}) ->
     is_tmp_path(TmpPath, Certfile);

+ 1 - 0
apps/emqx_bridge/test/emqx_bridge_api_SUITE.erl

@@ -86,6 +86,7 @@ init_per_testcase(_, Config) ->
     {ok, _} = emqx_cluster_rpc:start_link(node(), emqx_cluster_rpc, 1000),
     {Port, Sock, Acceptor} = start_http_server(fun handle_fun_200_ok/2),
     [{port, Port}, {sock, Sock}, {acceptor, Acceptor} | Config].
+
 end_per_testcase(_, Config) ->
     Sock = ?config(sock, Config),
     Acceptor = ?config(acceptor, Config),