exred_nodetest v0.1.3 Exred.NodeTest

A helper module to set up tests for Exred nodes.

See example usage below. The module and config arguments can be specified either on the use line or in the start_node call. module is the node module that will be testedconfigis the config overrides to start the node with (overrides the config in the actual node being tested)start_node/0will start the node. It will add the:pidand:nodekeys to the test context.:pidis the process id of the running node GenServer:node` is the node attributes map: %{ module :: atom, id :: atom name :: string, category :: string, info :: string, config :: map, ui_attributes :: map } ## Example (this would go into a test file) defmodule Exred.Node.MynodeTest do use ExUnit.Case use Exred.NodeTest, module: Exred.Node.Mynode setup_all do start_node() end test "runnnig", context do assert is_pid(context.pid) end end