diff options
author | Mathieu Lirzin <mthl@gnu.org> | 2016-06-29 16:16:48 +0200 |
---|---|---|
committer | Mathieu Lirzin <mthl@gnu.org> | 2016-06-29 16:16:48 +0200 |
commit | 990c902fcc5fee54a55334247df6719b9ca6e458 (patch) | |
tree | ff15d63c33d7aaed87e2d289d08f673baa855628 /tests | |
parent | 4a778022f984034220250ff9e9759eed64c1b2b5 (diff) | |
download | cuirass-990c902fcc5fee54a55334247df6719b9ca6e458.tar cuirass-990c902fcc5fee54a55334247df6719b9ca6e458.tar.gz |
Store build logs in the database.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/database.scm | 11 |
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)))) (λ () |