check (implementation = work in progress): logging; put sqlite DB in data subdirectory

This commit is contained in:
Helmut Merz 2024-06-16 19:14:54 +02:00
parent 46089ac27c
commit f7007b48e3
5 changed files with 8 additions and 3 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
test.db test.db
bin bin
*-test.log

View file

@ -66,8 +66,10 @@
(:method ((rcvr context) msg) (:method ((rcvr context) msg)
(let* ((acts (actions rcvr)) (let* ((acts (actions rcvr))
(hdlrs (select msg acts))) (hdlrs (select msg acts)))
(dolist (hdlr hdlrs) (if (null hdlrs)
(funcall hdlr rcvr msg))))) (log:warn "no action selected for ~s" msg)
(dolist (hdlr hdlrs)
(funcall hdlr rcvr msg))))))
;;;; simple printer service ;;;; simple printer service

View file

@ -6,7 +6,7 @@
:db-type :sqlite3 :db-type :sqlite3
:connect-args :connect-args
(:database-name (:database-name
,(namestring (scopes/testing:test-path "test.db"))) ,(namestring (scopes/testing:test-path "test.db" "data")))
:options nil)) :options nil))
(setf scopes/test-storage:*db-config-test* db-config-sqlite) (setf scopes/test-storage:*db-config-test* db-config-sqlite)

1
test/data/README.md Normal file
View file

@ -0,0 +1 @@
Database files and other storage items should be placed here.

View file

@ -51,6 +51,7 @@
(let* ((*config* nil) (let* ((*config* nil)
(t:*test-suite* (make-instance 'test-suite :name "core")) (t:*test-suite* (make-instance 'test-suite :name "core"))
(rcvr (receiver t:*test-suite*))) (rcvr (receiver t:*test-suite*)))
(log4cl:log-config :sane :daily (t:test-path "scopes-test.log" "log"))
(load (t:test-path "config-core" "etc")) (load (t:test-path "config-core" "etc"))
(core:add-action rcvr '(:test) #'check-message) (core:add-action rcvr '(:test) #'check-message)
(test-send) (test-send)