Skip to content

Bigsy/pg-embedded-clj

Repository files navigation

pg-embedded-clj

Embedded postgres for clojure - based on https://github.com/zonkyio/embedded-postgres

Usage

Clojars Project

Development:

(require 'pg-embedded-clj.core)

;; Start an embedded pg with default port:
(init-pg)

;; another call will halt the previous system:
(init-pg)

;; When you're done:
(halt-pg!)

Testing:

NOTE: these will halt running pg-embedded instances

(require 'clojure.test)

(use-fixtures :once with-pg-fn)

(defn around-all
  [f]
  (with-pg-fn (merge default-config
                           {:port 54321
                           :log-redirect "wibble.log"})
                    f))

(use-fixtures :once around-all)

;;; You can also wrap ad-hoc code in init/halt:
(with-pg default-config
	,,, :do-something ,,,)

Other useful clojure wrapped embedded testing libs

About

Embedded postgres for clojure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •