   (:require [com.narkisr.couchfs.couch-access :as couch])
   (:import java.io.File)
   (:use
+    [clojure.test :only [is]]
     (com.narkisr.couchfs (mounter :only [mount-with-group]))
     (clojure.java (shell :only [sh]))
-    (com.narkisr fs-logic )
+    (com.narkisr fs-logic)
+    [clojure.tools.trace :only [trace-ns trace-vars]]
     ))
 
 

(def rename-path)
(def file-path)

(defn mount-and-sleep [f]
  (def uuid (java.util.UUID/randomUUID))
  (def meta-file (-> (str "fake/." uuid "/" uuid ".json")))
  (def rename-path (str "fake/" uuid "/" uuid "renamed.html"))
  (def file-path (str "fake/" uuid "/" uuid ".html"))
  (couch/delete-db "playground")
  (couch/create-non-existing-db "playground")
  (sh "mkdir" "fake")
  (mount-with-group "http://127.0.0.1:5983/" "playground" "fake" "fuse-threads")

  (f)
  (sh "rm" "-r" (str "fake/" uuid))
  (sh "rm" "-r" (str "fake/." uuid))
  (sh "fusermount" "-u" "fake") 
  (couch/delete-db "playground"))


