Permalink
Browse files

Add postgres to the tests.

Signed-off-by: Sean Corfield <sean@corfield.org>
  • Loading branch information...
1 parent 9179096 commit 81b8c43ca01fb45735b368822d621ac364932900 @technomancy technomancy committed with seancorfield Oct 17, 2011
Showing with 11 additions and 0 deletions.
  1. +6 −0 pom.xml
  2. +5 −0 src/test/clojure/clojure/java/test_jdbc.clj
View
6 pom.xml
@@ -40,5 +40,11 @@
<version>1.8.0.10</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>8.4-702.jdbc4</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
View
5 src/test/clojure/clojure/java/test_jdbc.clj
@@ -46,6 +46,10 @@
:subname "clojure_test_hsqldb"})
(def mysql-str "mysql://clojure_test:clojure_test@localhost:3306/clojure_test")
+(def postgres-db {:subprotocol "postgresql"
+ :subname "clojure_test"
+ :user "clojure_test"
+ :password "clojure_test"})
(defn- test-specs
"Return a sequence of db-spec maps that should be used for tests"
@@ -173,6 +177,7 @@
{:name "Pomegranate" :appearance "fresh" :cost 585}
{:name "Kiwifruit" :grade 93})]
(condp = (:subprotocol db)
+ "postgresql" (is (= 2 (count r)))
"mysql" (is (= '({:generated_key 1} {:generated_key 2}) r))
"hsqldb" (is (= '(1 1) r))
"derby" (is (= '({:1 nil} {:1 nil}) r))))

0 comments on commit 81b8c43

Please sign in to comment.