I find the documentation on Eunit lacking, with regards to how to test a multi-node application. I found this example, but sadly when I run:
cluster_test_() ->
{node, foo,
fun (Node) ->
[?_assertEqual(pong, net_adm:ping(Node))]
end
}.
I get:
undefined
*** context setup failed ***
** in function slave:start/5 (slave.erl, line 197)
**exit:not_alive
Am I doing something wrong here?
As a sidenote, I also looked at gproc's distributed test here, but it's manually starting a number of slave nodes rather than using the built-in Eunit functionality.
Can someone give me some examples of how to use use the node
test fixture?
Thanks,