diff --git a/storage/storage.lisp b/storage/storage.lisp index f0c2378..847a745 100644 --- a/storage/storage.lisp +++ b/storage/storage.lisp @@ -46,11 +46,11 @@ (defun connect-sqlite (params config) (declare (ignorable params)) (print config) - (apply #'dbi:connect-cached (cons :sqlite3 config))) + (apply #'dbi:connect-cached (cons :sqlite3 (getf config :connect-args)))) (defun connect-postgres (params config) (declare (ignorable params)) - (apply #'dbi:connect (cons :postgres config))) + (apply #'dbi:connect (cons :postgres (getf config :connect-args)))) (defvar *db-params* '(:sqlite3 (:connect connect-sqlite diff --git a/test/etc.lisp b/test/etc.lisp index 9b179c4..c1d74ec 100644 --- a/test/etc.lisp +++ b/test/etc.lisp @@ -3,17 +3,20 @@ (defparameter db-config-sqlite '(:db-type :sqlite3 - :database-name "test/test.db" - :busy-timeout 1)) + :connect-args + (:database-name "test/test.db") + :options nil)) (defparameter db-config-postgres '(:db-type :postgres - :database-name "cltest" - :host "localhost" - :port 5432 - :username "testuser" - :password "secret" - :schema "testing")) + :connect-args + (:database-name "cltest" + :host "localhost" + :port 5432 + :username "testuser" + :password "secret") + :options + (:schema "testing"))) (setf scopes/test-storage:*db-config-sqlite* db-config-sqlite) (setf scopes/test-storage:*db-config-postgres* db-config-postgres)