diff options
author | Brad Anderson <brad@cloudant.com> | 2010-03-24 20:49:47 -0400 |
---|---|---|
committer | Brad Anderson <brad@cloudant.com> | 2010-05-09 22:56:22 -0400 |
commit | b32640350ee550c105258d47629b0b8c3e8775d2 (patch) | |
tree | cda3a28179c02ecaea4fac4a558300f3984e4b4f /test/mem3_test.erl | |
parent | 78b2e92c8c2bc22c17a7670437dcd6852768690d (diff) |
store Args in mem State, instead of just 'test', and allow for an Args-supplied Config (usually for testing only)
Diffstat (limited to 'test/mem3_test.erl')
-rw-r--r-- | test/mem3_test.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/mem3_test.erl b/test/mem3_test.erl index ae6dcaa5..25815d54 100644 --- a/test/mem3_test.erl +++ b/test/mem3_test.erl @@ -1,6 +1,7 @@ -module(mem3_test). -include("../include/common.hrl"). +-include("../include/config.hrl"). -include_lib("eunit/include/eunit.hrl"). %% TEST SETUP @@ -23,7 +24,9 @@ all_tests_test_() -> test_setup() -> - {ok, Pid} = mem3:start_link(test), + Config = #config{n=3,r=2,w=2,q=3,directory="/srv/db", + storage_mod="dynomite_couch_storage"}, + {ok, Pid} = mem3:start_link([{test,true}, {config, Config}]), Pid. @@ -34,7 +37,8 @@ test_teardown(Pid) -> %% TESTS init(_Pid) -> - #mem{test=Test} = mem3:state(), + #mem{args=Args} = mem3:state(), + Test = proplists:get_value(test, Args), ?assertEqual(true, Test). |