Przeglądaj źródła

chore: make dialyzer && test happy

firest 2 lat temu
rodzic
commit
cb31032e6d

+ 1 - 1
apps/emqx_bridge_iotdb/src/emqx_bridge_iotdb.app.src

@@ -1,7 +1,7 @@
 %% -*- mode: erlang -*-
 {application, emqx_bridge_iotdb, [
     {description, "EMQX Enterprise Apache IoTDB Bridge"},
-    {vsn, "0.1.1"},
+    {vsn, "0.1.2"},
     {modules, [
         emqx_bridge_iotdb,
         emqx_bridge_iotdb_impl

+ 13 - 13
apps/emqx_bridge_iotdb/src/emqx_bridge_iotdb_impl.erl

@@ -23,35 +23,35 @@
             scheme := http | https,
             host := iolist(),
             port := inet:port_number(),
-            path := '_'
+            path := _
         },
         connect_timeout := pos_integer(),
         pool_type := random | hash,
         pool_size := pos_integer(),
-        request := undefined | map(),
-        is_aligned := boolean(),
-        iotdb_version := binary(),
-        device_id := binary() | undefined,
-        atom() => '_'
+        request => undefined | map(),
+        is_aligned => boolean(),
+        iotdb_version => binary(),
+        device_id => binary() | undefined,
+        atom() => _
     }.
 
 -type state() ::
     #{
-        base_path := '_',
+        base_path := _,
         base_url := #{
             scheme := http | https,
             host := iolist(),
             port := inet:port_number(),
-            path := '_'
+            path := _
         },
         connect_timeout := pos_integer(),
         pool_type := random | hash,
         pool_size := pos_integer(),
-        request := undefined | map(),
-        is_aligned := boolean(),
-        iotdb_version := binary(),
-        device_id := binary() | undefined,
-        atom() => '_'
+        request => undefined | map(),
+        is_aligned => boolean(),
+        iotdb_version => binary(),
+        device_id => binary() | undefined,
+        atom() => _
     }.
 
 -type manager_id() :: binary().

+ 2 - 1
apps/emqx_connector/test/emqx_connector_http_tests.erl

@@ -25,7 +25,8 @@ wrap_auth_headers_test_() ->
             meck:expect(ehttpc_sup, start_pool, 2, {ok, foo}),
             meck:expect(ehttpc, request, fun(_, _, Req, _, _) -> {ok, 200, Req} end),
             meck:expect(ehttpc_pool, pick_worker, 1, self()),
-            [ehttpc_sup, ehttpc, ehttpc_pool]
+            meck:expect(emqx_resource, allocate_resource, 3, ok),
+            [ehttpc_sup, ehttpc, ehttpc_pool, emqx_resource]
         end,
         fun meck:unload/1, fun(_) ->
             Config = #{