            (apply car/srem @#'tundra/k-evictable ks)))
   (wcar* (car/srem @#'tundra/k-evictable (tkey :invalid-evictable))))
 
+(defn cleanup-fixture [f] (clean-up!) (f) (clean-up!))
+(test/use-fixtures :once cleanup-fixture)
 
-(defn cleanup-fixture
-  [f]
-  (clean-up!)
-  (f)
-  (clean-up!))
-
-(use-fixtures :once cleanup-fixture)
-
-
-(defonce s3-creds {:access-key (get (System/getenv) "AWS_S3_ACCESS_KEY")
-                   :secret-key (get (System/getenv) "AWS_S3_SECRET_KEY")})
-
-(def dstore (ts3/s3-datastore s3-creds "ensso-store/tundra"))
+(def dstore (tdisk/disk-datastore "./carmine-tundra-test-temp"))
 
 (defn- s->ba [^String s] (.getBytes s "UTF-8"))
 (defn- ba->s [^bytes ba] (String.  ba "UTF-8"))
 
-;;;; S3 DataStore
-
-(deftest s3-tests
-  (is (true? (and (:access-key s3-creds)
-                  (:secret-key s3-creds))))
-
-  (testing "Basic put and fetch case"
+(deftest datastore-tests
+  (test/testing "Basic put and fetch case"
     (tundra/put-key dstore (tkey :foo) (s->ba "hello world"))
     (is (= "hello world"
            (-> dstore

                                     (tkey 0) (tkey 1) (tkey 2))
                       (catch Exception _ nil)))

           (Thread/sleep 8000)          ; Wait for replication
           (mq/stop tworker)
           (wcar* (car/del (tkey 0))
                  (car/set (tkey 2) [:clj-val-new])) ; Make some local modifications

(ns taoensso.carmine.tests.tundra
  (:require
   [clojure.test     :as test :refer [is deftest]]
   [taoensso.carmine :as car  :refer [wcar]]
   [taoensso.carmine.message-queue :as mq]
   [taoensso.carmine.tundra        :as tundra]
   [taoensso.carmine.tundra.disk   :as tdisk]))

(comment
  (remove-ns      'taoensso.carmine.tests.tundra)
  (test/run-tests 'taoensso.carmine.tests.tundra))

(defmacro wcar* [& body] `(car/wcar {} ~@body))
(def tkey (partial car/key :carmine :tundra :test))
(def tqname "carmine-tundra-tests")
(def mqname (format "tundra:%s" (name tqname))) ; Nb has prefix

(defn clean-up! []
  (mq/clear-queues {} mqname)
