mirror of
https://github.com/seancorfield/usermanager-example.git
synced 2025-08-03 18:53:19 +08:00
beta 4: pgwire-server -> server; require dbname
Signed-off-by: Sean Corfield <sean@corfield.org>
This commit is contained in:
8
deps.edn
8
deps.edn
@ -1,13 +1,13 @@
|
||||
{:mvn/repos {"ossrh-snapshots" {:url "https://s01.oss.sonatype.org/content/repositories/snapshots"}}
|
||||
:paths ["resources" "src"]
|
||||
:deps {org.clojure/clojure {:mvn/version "1.12.0-rc2"}
|
||||
:deps {org.clojure/clojure {:mvn/version "1.12.0"}
|
||||
|
||||
com.github.seancorfield/next.jdbc {:mvn/version "1.3.939"}
|
||||
com.github.seancorfield/next.jdbc {:mvn/version "1.3.967"}
|
||||
org.postgresql/postgresql {:mvn/version "42.7.4"}
|
||||
com.stuartsierra/component {:mvn/version "1.1.0"}
|
||||
|
||||
compojure/compojure {:mvn/version "1.7.1"}
|
||||
ring/ring {:mvn/version "1.12.2"}
|
||||
ring/ring {:mvn/version "1.13.0"}
|
||||
ring/ring-defaults {:mvn/version "0.5.0"}
|
||||
|
||||
selmer/selmer {:mvn/version "1.12.61"}}
|
||||
@ -20,5 +20,5 @@
|
||||
;; in-process: needed on JDK17+
|
||||
:jvm-opts ["--add-opens=java.base/java.nio=ALL-UNNAMED"
|
||||
"-Dio.netty.tryReflectionSetAccessible=true"]}
|
||||
:build {:replace-deps {io.github.clojure/tools.build {:mvn/version "0.10.5"}}
|
||||
:build {:replace-deps {io.github.clojure/tools.build {:mvn/version "0.10.6"}}
|
||||
:ns-default build}}}
|
||||
|
@ -62,7 +62,7 @@
|
||||
(invoke [_] datasource))
|
||||
|
||||
(defn setup-database []
|
||||
(map->Database {:db-spec {:dbtype "postgresql" :host "localhost" :port 5432}}))
|
||||
(map->Database {:db-spec {:dbtype "postgresql" :dbname "xtdb" :host "localhost" :port 5432}}))
|
||||
|
||||
;; data model access functions
|
||||
|
||||
|
@ -14,9 +14,10 @@
|
||||
(defn- with-test-db
|
||||
"A test fixture that sets up an in-process XTDB node for running tests."
|
||||
[t]
|
||||
(with-open [_ (xtn/start-node {:pgwire-server {:port test-pg-port}})]
|
||||
(with-open [_ (xtn/start-node {:server {:port test-pg-port}})]
|
||||
(let [db (component/start
|
||||
(model/map->Database {:db-spec {:dbtype "postgresql"
|
||||
:dbname "xtdb"
|
||||
:host "localhost"
|
||||
:port test-pg-port}}))]
|
||||
(reset! test-db db)
|
||||
|
Reference in New Issue
Block a user