basho/riak_kv — pull request #573 by bsparrow435 (2013-06-06 03:55:48+00:00)
Title: Rework riak-admin test to support local and cluster options

Add `riak:client_test(cluster)` which creates a list of bucket/keys which maps to all preflists in the ring. Each keys does a get/put/get cycle with R=quorum and W|DW=N through a client connected to the local node.

The list of `{Preflist,{Bucket,Key}}` is saved to `Bucket: <<"__riak_client_test__">> Key: <<"list">> ` for future use. This is ok because of consistent hashing as long as the n_val is not changed on the <<"__riak_client_test__">> bucket or the ring_size is not changed. I plan on adding logic to check if the ring_size has been changed(something like check the length of the stored list versus the length of `riak_core_ring:all_preflists(Ring, NValue).`)

Legacy functionality is not changed. The local node test still uses a static key that may or may not map to the local node. I am planning on changing this soon.