Guard one more test that relies on authentication/ordering

This commit is contained in:
Michael S. Klishin 2012-04-16 00:44:08 +04:00
parent 29d97f611d
commit 379fb73795

View file

@ -23,6 +23,7 @@
(let [connection (monger.core/connect { :host "127.0.0.1" })] (let [connection (monger.core/connect { :host "127.0.0.1" })]
(is (instance? com.mongodb.Mongo connection)))) (is (instance? com.mongodb.Mongo connection))))
(when-not (System/getenv "CI")
(deftest connect-to-mongo-via-uri-without-credentials (deftest connect-to-mongo-via-uri-without-credentials
(let [connection (monger.core/connect-via-uri! "mongodb://127.0.0.1/monger-test4")] (let [connection (monger.core/connect-via-uri! "mongodb://127.0.0.1/monger-test4")]
(is (= (-> connection .getAddress ^InetAddress (.sameHost "127.0.0.1"))))) (is (= (-> connection .getAddress ^InetAddress (.sameHost "127.0.0.1")))))
@ -33,7 +34,7 @@
(let [connection (monger.core/connect-via-uri! "mongodb://clojurewerkz/monger!:monger!@127.0.0.1/monger-test4")] (let [connection (monger.core/connect-via-uri! "mongodb://clojurewerkz/monger!:monger!@127.0.0.1/monger-test4")]
(is (= (-> connection .getAddress ^InetAddress (.sameHost "127.0.0.1"))))) (is (= (-> connection .getAddress ^InetAddress (.sameHost "127.0.0.1")))))
;; reconnect using regular host ;; reconnect using regular host
(helper/connect!)) (helper/connect!)))
(if-let [uri (System/getenv "MONGOHQ_URL")] (if-let [uri (System/getenv "MONGOHQ_URL")]
(deftest ^{:external true} connect-to-mongo-via-uri-with-valid-credentials (deftest ^{:external true} connect-to-mongo-via-uri-with-valid-credentials