From 29d97f611dcd18557f25715d7867896eae5c2fd9 Mon Sep 17 00:00:00 2001 From: "Michael S. Klishin" Date: Mon, 16 Apr 2012 00:41:43 +0400 Subject: [PATCH] Try excluding the test that drops databases from CI --- .travis.yml | 2 +- test/monger/test/db_test.clj | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1685a89..b16bba6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,4 @@ language: clojure lein: lein2 before_script: - ./bin/ci/before_script.sh -script: lein2 test +script: lein2 all test diff --git a/test/monger/test/db_test.clj b/test/monger/test/db_test.clj index 9fb8731..ec00301 100644 --- a/test/monger/test/db_test.clj +++ b/test/monger/test/db_test.clj @@ -20,16 +20,19 @@ (is (monger.core/authenticate db-name username pwd))))) -(deftest test-drop-database - ;; drop a secondary database here. MK. - (monger.core/with-db (monger.core/get-db "monger-test3") - (let [collection "test" - _ (mgcol/insert collection { :name "Clojure" }) - check (mgcol/count collection) - _ (monger.db/drop-db)] - (is (= 1 check)) - (is (not (mgcol/exists? collection))) - (is (= 0 (mgcol/count collection)))))) +;; do not run this test for CI, it complicates matters by messing up +;; authentication for some other tests :( MK. +(when-not (System/getenv "CI") + (deftest test-drop-database + ;; drop a secondary database here. MK. + (monger.core/with-db (monger.core/get-db "monger-test3") + (let [collection "test" + _ (mgcol/insert collection { :name "Clojure" }) + check (mgcol/count collection) + _ (monger.db/drop-db)] + (is (= 1 check)) + (is (not (mgcol/exists? collection))) + (is (= 0 (mgcol/count collection))))))) (deftest test-get-collection-names