Fix tests.
* tests/database.scm (db-init): Force database creation. * tests/http.scm (db-init): Ditto. * tests/metrics (db-init): Ditto.
This commit is contained in:
parent
53d8b66bf9
commit
e61e7a5ca4
|
@ -1017,22 +1017,19 @@ ORDER BY ~a;"
|
||||||
(params
|
(params
|
||||||
(map (match-lambda
|
(map (match-lambda
|
||||||
((name . value)
|
((name . value)
|
||||||
(let ((key
|
(cons (symbol->keyword
|
||||||
(symbol->keyword
|
(or (assq-ref
|
||||||
(or (assq-ref
|
'((border-low-time . borderlowtime)
|
||||||
'((border-low-time . borderlowtime)
|
(border-high-time . borderhightime)
|
||||||
(border-high-time . borderhightime)
|
(border-low-id . borderlowid)
|
||||||
(border-low-id . borderlowid)
|
(border-high-id . borderhighid))
|
||||||
(border-high-id . borderhighid))
|
name)
|
||||||
name)
|
name))
|
||||||
name)))
|
(match name
|
||||||
(value
|
('nr (or value -1))
|
||||||
(match name
|
('order #f) ; Doesn't need binding.
|
||||||
('nr (or value -1))
|
('status #f) ; Doesn't need binding.
|
||||||
('order #f) ; Doesn't need binding.
|
(else value)))))
|
||||||
('status #f) ; Doesn't need binding.
|
|
||||||
(else value))))
|
|
||||||
(cons key value))))
|
|
||||||
filters))
|
filters))
|
||||||
(builds (exec-query/bind-params db query params)))
|
(builds (exec-query/bind-params db query params)))
|
||||||
(let loop ((builds builds)
|
(let loop ((builds builds)
|
||||||
|
|
|
@ -91,6 +91,7 @@
|
||||||
(test-group-with-cleanup "database"
|
(test-group-with-cleanup "database"
|
||||||
(test-assert "db-init"
|
(test-assert "db-init"
|
||||||
(begin
|
(begin
|
||||||
|
(%create-database? #t)
|
||||||
(%db (db-open))
|
(%db (db-open))
|
||||||
(%db-channel (make-worker-thread-channel
|
(%db-channel (make-worker-thread-channel
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
|
|
@ -107,6 +107,7 @@
|
||||||
|
|
||||||
(test-assert "db-init"
|
(test-assert "db-init"
|
||||||
(begin
|
(begin
|
||||||
|
(%create-database? #t)
|
||||||
(%db (db-open))
|
(%db (db-open))
|
||||||
(%db-channel (make-worker-thread-channel
|
(%db-channel (make-worker-thread-channel
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
(test-group-with-cleanup "database"
|
(test-group-with-cleanup "database"
|
||||||
(test-assert "db-init"
|
(test-assert "db-init"
|
||||||
(begin
|
(begin
|
||||||
|
(%create-database? #t)
|
||||||
(%db (db-open))
|
(%db (db-open))
|
||||||
(%db-channel (make-worker-thread-channel
|
(%db-channel (make-worker-thread-channel
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
|
Loading…
Reference in New Issue