move tests to outer scope

Change-Id: I43c0e33b19671bb1dc005f1bbc6053b1676a9fcd
Reviewed-on: http://review.couchbase.org/27141
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>