-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
After following this step of the guestbook guide, I get the following when running lein test.
$ lein test
2020-07-14 20:42:51,454 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
Syntax error compiling at (guestbook/test/db/core.clj:20:3).
No such var: jdbc/with-transaction
Full report at:
/tmp/clojure-16884464781834444921.edn
Tests failed.
Sample code in the guide has the namespace set like so:
(ns guestbook.test.db.core
(:require
[guestbook.db.core :refer [*db*] :as db]
[luminus-migrations.core :as migrations]
[clojure.test :refer :all]
[clojure.java.jdbc :as jdbc]
[guestbook.config :refer [env]]
[mount.core :as mount]))
when initially after creating the project with lein new luminus guestbook +h2 +immutant it was originally:
(ns guestbook.test.db.core
(:require
[guestbook.db.core :refer [*db*] :as db]
[java-time.pre-java8]
[luminus-migrations.core :as migrations]
[clojure.test :refer :all]
[next.jdbc :as jdbc]
[guestbook.config :refer [env]]
[mount.core :as mount]))
Found that swapping out [clojure.java.jdbc :as jdbc] for [next.jdbc :as jdbc] and leaving out [java-time.pre-java8] seemed to work.
Only issue after that is lein test seems to use guestbook_dev.db instead of guestbook_test.db, where entries to the db during the test are persisted and can be seen afterwards on the webpage when doing a lein run.
Also curious why the db files are not included in the .gitignore.
generated using Luminus version "3.78"
Metadata
Metadata
Assignees
Labels
No labels