aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/database.scm11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/database.scm b/tests/database.scm
index 41cb4d6..232eab4 100644
--- a/tests/database.scm
+++ b/tests/database.scm
@@ -21,10 +21,10 @@
(cuirass job)
(srfi srfi-64))
-(define* (make-dummy-job #:optional (name "foo"))
+(define* (make-dummy-job #:optional (name "foo") #:key (metadata '()))
(make-job #:name name
#:derivation (string-append name ".drv")
- #:metadata '()))
+ #:metadata metadata))
(define %db
;; Global Slot for a database object.
@@ -50,6 +50,13 @@
(test-assert "db-get-evaluation"
(db-get-evaluation (%db) (%id)))
+ (test-equal "db-add-build-log"
+ (let ((job (make-dummy-job #:metadata `((id . ,(%id)))))
+ (log-column 3))
+ (db-add-build-log (%db) job "foo log")
+ (vector-ref (db-get-evaluation (%db) (%id)) log-column))
+ "foo log")
+
(test-assert "db-close"
(db-close (%db))))
(λ ()