Add mixed-cluster config + helper script + upgrade test

This commit is contained in:
Joseph Blomstedt 2012-04-27 17:11:39 -07:00
parent 7f6f9eb55a
commit d05cd84944
3 changed files with 43 additions and 0 deletions

13
rtdev-current.sh Normal file
View File

@ -0,0 +1,13 @@
cwd=$(pwd)
cd /tmp/rt
git reset HEAD --hard
git clean -fd
rm -rf /tmp/rt/current
mkdir /tmp/rt/current
cd $cwd
cp -a dev /tmp/rt/current
cd /tmp/rt
git add .
git commit -a -m "riak_test init" --amend

10
rtdev-mixed.config Normal file
View File

@ -0,0 +1,10 @@
{rt_deps, ["/Users/jtuple/basho/CLEAN2/riak/deps"]}.
{rt_max_wait_time, 180000}.
{rt_retry_delay, 500}.
{rt_harness, rtdev}.
{rtdev_path, [{root, "/tmp/rt"},
{current, "/tmp/rt/current"},
{"1.1.2", "/tmp/rt/riak-1.1.2"},
{"1.0.3", "/tmp/rt/riak-1.0.3"},
{"0.14.2", "/tmp/rt/riak-0.14.2"}]}.

20
tests/upgrade.erl Normal file
View File

@ -0,0 +1,20 @@
-module(upgrade).
-export([upgrade/0]).
-include_lib("eunit/include/eunit.hrl").
upgrade() ->
Nodes = rt:build_cluster(4, ["1.0.3", "1.0.3", "1.1.2", current]),
[Node1, Node2, Node3, _Node4] = Nodes,
lager:info("Writing 100 keys"),
rt:systest_write(Node1, 100, 3),
?assertEqual([], rt:systest_read(Node1, 100, 1)),
rtdev:upgrade(Node1, "1.1.2"),
lager:info("Ensuring keys still exist"),
rt:stop(Node2),
rt:stop(Node3),
rt:systest_read(Node1, 100, 1),
?assertEqual([], rt:systest_read(Node1, 100, 1)),
ok.