Guard one more test that relies on authentication/ordering
This commit is contained in:
parent
29d97f611d
commit
379fb73795
1 changed files with 11 additions and 10 deletions
|
|
@ -23,17 +23,18 @@
|
||||||
(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))))
|
||||||
|
|
||||||
(deftest connect-to-mongo-via-uri-without-credentials
|
(when-not (System/getenv "CI")
|
||||||
(let [connection (monger.core/connect-via-uri! "mongodb://127.0.0.1/monger-test4")]
|
(deftest connect-to-mongo-via-uri-without-credentials
|
||||||
(is (= (-> connection .getAddress ^InetAddress (.sameHost "127.0.0.1")))))
|
(let [connection (monger.core/connect-via-uri! "mongodb://127.0.0.1/monger-test4")]
|
||||||
;; reconnect using regular host
|
(is (= (-> connection .getAddress ^InetAddress (.sameHost "127.0.0.1")))))
|
||||||
(helper/connect!))
|
;; reconnect using regular host
|
||||||
|
(helper/connect!))
|
||||||
|
|
||||||
(deftest connect-to-mongo-via-uri-with-valid-credentials
|
(deftest connect-to-mongo-via-uri-with-valid-credentials
|
||||||
(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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue