guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Fix specifications summary test.


From: Mathieu Othacehe
Subject: branch master updated: Fix specifications summary test.
Date: Thu, 08 Apr 2021 06:09:25 -0400

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository guix-cuirass.

The following commit(s) were added to refs/heads/master by this push:
     new c5dd74a  Fix specifications summary test.
c5dd74a is described below

commit c5dd74afcef1b992f7de62b2eb44ce1a6b16d006
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Thu Apr 8 12:08:35 2021 +0200

    Fix specifications summary test.
    
    * tests/database.scm ("db-get-specifications-summary"): Fix it.
---
 tests/database.scm | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/tests/database.scm b/tests/database.scm
index 4e95686..a86f0b0 100644
--- a/tests/database.scm
+++ b/tests/database.scm
@@ -254,6 +254,19 @@ timestamp, checkouttime, evaltime) VALUES ('guix', 0, 0, 
0, 0);")
        (assoc-ref build #:status)
        (assoc-ref build #:job-name))))
 
+  (test-equal "db-get-specifications-summary"
+    '("guix" 0 0 1 0)
+    (begin
+      (db-set-evaluation-status 2 (evaluation-status succeeded))
+      (match (db-get-specifications-summary)
+        ((summary)
+         (list
+          (assq-ref summary #:specification)
+          (assq-ref summary #:percentage)
+          (assq-ref summary #:succeeded)
+          (assq-ref summary #:failed)
+          (assq-ref summary #:scheduled))))))
+
   (test-assert "db-get-builds"
     (let* ((build (match (db-get-builds `((order . build-id)
                                           (status . failed)))
@@ -312,17 +325,6 @@ timestamp, checkouttime, evaltime) VALUES ('guix', 0, 0, 
0, 0);")
               (assq-ref summary #:scheduled)))
            summaries)))
 
-  (test-equal "db-get-specifications-summary"
-    '("guix" 0 0 1 0)
-    (match (db-get-specifications-summary)
-      ((summary)
-       (list
-        (assq-ref summary #:specification)
-        (assq-ref summary #:percentage)
-        (assq-ref summary #:succeeded)
-        (assq-ref summary #:failed)
-        (assq-ref summary #:scheduled)))))
-
   (test-equal "db-get-evaluations-id-min"
     1
     (db-get-evaluations-id-min "guix"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]