KVStore tests: Use unique name for data_dir 90/76190/3
authorDave Rigby <daver@couchbase.com>
Mon, 3 Apr 2017 13:22:35 +0000 (14:22 +0100)
committerDave Rigby <daver@couchbase.com>
Thu, 6 Apr 2017 16:00:22 +0000 (16:00 +0000)
commit31b17623fd763270b1a4193732da1768c3faea62
tree7a67f88a37937c86e288d5a8e8b02d24f4ecb39c
parent6fd7dd0920daf7c46e1f18d905d31f0e36a977cf
KVStore tests: Use unique name for data_dir

The CouchKVStoreTest, CouchKVStoreErrorInjectionTest and
CouchstoreTest suites are using a fixed path ("/tmp/kvstore-test") for
the data directory. This could collide with other instances.

Instead use a uniquely-generated name, and move the common setup code
into a SetUp() function.

Change-Id: I07b8169b66e1c0c55af538b1fd10de83d932f92c
Reviewed-on: http://review.couchbase.org/76190
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
tests/module_tests/kvstore_test.cc