shutdown: add a test for 56ac8d1cf7

References #309.
This commit is contained in:
Michael Klishin 2019-02-03 22:00:11 +03:00
parent a392d8e432
commit e11e7d1885
1 changed files with 8 additions and 0 deletions

View File

@ -42,6 +42,14 @@ defmodule ShutdownCommandTest do
assert @command.validate([], Map.merge(%{wait: false}, context[:opts])) == :ok
end
# this command performs rpc calls in validate/2
test "validate: request to a non-existent node returns nodedown" do
target = :jake@thedog
opts = %{node: target, wait: true, timeout: 10}
assert match?({:error, {:badrpc, _}}, @command.validate([], opts))
end
test "run: request to a non-existent node returns nodedown" do
target = :jake@thedog