metrics: Fix tests.

* tests/metrics.scm ("builds-per-day", "new-derivations-per-day"): Fix tests
results that were depending of the local time.
("evaluation-completion-speed"): Adapt to new unit.
This commit is contained in:
Mathieu Othacehe 2020-09-17 10:39:25 +02:00
parent 89f0dbc8e1
commit d22ffdfa2a
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
1 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ nix_name, log, status, timestamp, starttime, stoptime) VALUES
(db-get-metrics-with-id 'average-eval-duration-per-spec)))
(test-equal "builds-per-day"
2.0
1.0
(begin
(db-update-metric 'builds-per-day)
(db-get-metric 'builds-per-day yesterday)))
@ -106,7 +106,7 @@ nix_name, log, status, timestamp, starttime, stoptime) VALUES
(db-get-metrics-with-id 'pending-builds)))
(test-equal "new-derivations-per-day"
`((,yesterday . 2.0))
`((,yesterday . 1.0))
(begin
(db-update-metric 'new-derivations-per-day)
(db-get-metrics-with-id 'new-derivations-per-day)))
@ -140,7 +140,7 @@ nix_name, log, status, timestamp, starttime, stoptime) VALUES
(db-get-metrics-with-id 'average-eval-build-complete-time)))
(test-equal "evaluation-completion-speed"
15.0
900.0
(begin
(db-update-metric 'evaluation-completion-speed 4)
(db-get-metric 'evaluation-completion-speed 4)))