diff --git a/rtdev-current.sh b/rtdev-current.sh new file mode 100644 index 00000000..c338de0b --- /dev/null +++ b/rtdev-current.sh @@ -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 + + diff --git a/rtdev-mixed.config b/rtdev-mixed.config new file mode 100644 index 00000000..1820e9e6 --- /dev/null +++ b/rtdev-mixed.config @@ -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"}]}. + diff --git a/tests/upgrade.erl b/tests/upgrade.erl new file mode 100644 index 00000000..0979f8c5 --- /dev/null +++ b/tests/upgrade.erl @@ -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. + +