Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test cases for emqx_dashboard_cli #34

Merged
merged 3 commits into from Feb 27, 2019

Conversation

@linjunjj
Copy link
Contributor

linjunjj commented Feb 22, 2019

Add test cases for emqx_dashboard_cli

@gilbertwong96 gilbertwong96 removed the request for review from turtleDeng Feb 22, 2019
{emqx_management, local_path("deps/emqx_management/priv/emqx_management.schema"),
local_path("deps/emqx_management/etc/emqx_management.conf")},
{emqx_dashboard, local_path("priv/emqx_dashboard.schema"),
local_path("etc/emqx_dashboard.conf")}]],

This comment has been minimized.

Copy link
@gilbertwong96

gilbertwong96 Feb 22, 2019

Contributor

Duplicated with the procedure in another SUITE. I suggest you to abstract the common logic.

case Hash1 =:= erlang:md5(<<Salt1/binary, <<"newpassword">>/binary>>) of
true -> ok;
false -> ct:fail("password error")
end,

This comment has been minimized.

Copy link
@terry-xiaoyu

terry-xiaoyu Feb 22, 2019

Contributor

?assertEqual(Hash1, erlang:md5(<<Salt1/binary, <<"newpassword">>/binary>>))

emqx_dashboard_cli:admins(["add", "admin1", "pass1"]),
emqx_dashboard_cli:admins(["add", "admin2", "passw2"]),
AdminList = emqx_dashboard_admin:all_users(),
2 = length(AdminList).

This comment has been minimized.

Copy link
@terry-xiaoyu

terry-xiaoyu Feb 22, 2019

Contributor

?assertEqual()

@turtleDeng turtleDeng merged commit 71db0e0 into develop Feb 27, 2019
@turtleDeng turtleDeng deleted the add_test_cases branch Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.