 (ns celestial.test.proxmox
-  (:require proxmox.provider)
+  (:require 
+    [celestial.fixtures :as fix :refer [redis-prox-spec with-conf with-m?]] 
+    proxmox.provider)
   (:use 
     midje.sweet
     [proxmox.provider :only (vzctl enable-features)]

      (fact "missing vmid"
            (vconstruct (assoc-in redis-prox-spec [:proxmox :vmid] nil)) => 
            (throws ExceptionInfo (with-m? {:machine {:vmid '("vmid must be present")}} ))))
    (fact "non int vmid"
          (vconstruct (assoc-in redis-prox-spec [:proxmox :vmid] "string")) => 
          (throws ExceptionInfo (with-m? {:machine {:vmid '("vmid must be a number")}})))
    (with-redefs [ct-id (fn [_] 101)]

    [celestial.model :only (vconstruct)]
    [proxmox.generators :only (ct-id)]
    [proxmox.auth :only (fetch-headers auth-headers auth-store auth-expired?)]
    )
  (:import clojure.lang.ExceptionInfo))

(with-conf
