test: expect unsupported_version for now

This commit is contained in:
Zaiming Shi 2021-06-05 15:04:11 +02:00
parent 5ccaff5a86
commit b6b144fa31
1 changed files with 4 additions and 1 deletions

View File

@ -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).