Explorar el Código

test: expect unsupported_version for now

Zaiming Shi hace 4 años
padre
commit
b6b144fa31
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      apps/emqx_management/test/emqx_mgmt_api_SUITE.erl

+ 4 - 1
apps/emqx_management/test/emqx_mgmt_api_SUITE.erl

@@ -563,7 +563,10 @@ t_data_import_content(_) ->
     Dir = emqx:get_env(data_dir),
     {ok, Bin} = file:read_file(filename:join(Dir, Filename)),
     Content = emqx_json:decode(Bin),
-    ?assertMatch({ok, "{\"code\":0}"}, request_api(post, api_path(["data","import"]), [], auth_header_(), Content)),
+    %% TODO: enable when 5.0 if we are still using data export/import
+    %?assertMatch({ok, "{\"code\":0}"}, request_api(post, api_path(["data","import"]), [], auth_header_(), Content)),
+    ?assertMatch({ok, "{\"message\":\"5.0\",\"code\":\"unsupported_version\"}"},
+                 request_api(post, api_path(["data","import"]), [], auth_header_(), Content)),
     application:stop(emqx_rule_engine),
     application:stop(emqx_dahboard).