summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBrad Anderson <brad@cloudant.com>2010-03-15 16:11:33 -0400
committerBrad Anderson <brad@cloudant.com>2010-05-09 22:56:22 -0400
commit8429ee374325a6a2c9779c5001c143ce4b35b1c6 (patch)
tree995b1e2885ca5e8a17d034cb7c50c27482c66dc1 /test
parente522c645e3d34403ae64193db3422ad8c574d256 (diff)
more work on mem3 init, handling different types of joins, requiring more human-intervention, reworking startargs to strip out most everything
Diffstat (limited to 'test')
-rw-r--r--test/mem3_test.erl38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/mem3_test.erl b/test/mem3_test.erl
new file mode 100644
index 00000000..6286936e
--- /dev/null
+++ b/test/mem3_test.erl
@@ -0,0 +1,38 @@
+-module(mem3_test).
+
+-include("../include/common.hrl").
+-include_lib("eunit/include/eunit.hrl").
+
+%% TEST SETUP
+
+all_tests_test_() ->
+ {"membership3 tests",
+ [
+ {setup,
+ fun test_setup/0,
+ fun test_teardown/1,
+ fun(Pid) ->
+ {with, Pid,
+ [
+ fun init/1
+ ]}
+ end}
+ ]
+ }.
+
+
+test_setup() ->
+ {ok, Pid} = mem3:start_link(test),
+ Pid.
+
+
+test_teardown(Pid) ->
+ exit(Pid, shutdown).
+
+
+%% TESTS
+
+init(_Pid) ->
+ State = #mem{test=Test} = mem3:state(),
+ ?debugFmt("~nState: ~p~n", [State]),
+ ?assertEqual(true, Test).