aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/jobs-load-new-guix-revision.scm54
1 files changed, 25 insertions, 29 deletions
diff --git a/tests/jobs-load-new-guix-revision.scm b/tests/jobs-load-new-guix-revision.scm
index 1b993cb..6d47fb9 100644
--- a/tests/jobs-load-new-guix-revision.scm
+++ b/tests/jobs-load-new-guix-revision.scm
@@ -2,6 +2,7 @@
#:use-module (srfi srfi-64)
#:use-module (ice-9 match)
#:use-module (squee)
+ #:use-module (fibers)
#:use-module (guix utils)
#:use-module (guix store)
#:use-module (guix tests)
@@ -62,11 +63,7 @@
(mock
((guix-data-service jobs load-new-guix-revision)
extract-information-from
- (lambda* (conn guix-revision-id commit
- guix-source store-path
- #:key skip-system-tests?
- extra-inferior-environment-variables
- parallelism)
+ (lambda _
#t))
(mock
@@ -81,6 +78,12 @@
(lambda (channel commit)
'()))
+ (mock
+ ((guix-data-service jobs load-new-guix-revision)
+ derivation-file-names->derivation-ids
+ (lambda _
+ #(1)))
+
(mock
((guix store)
add-temp-root
@@ -97,7 +100,12 @@
"test-commit"
"test-source")
((id)
- (process-load-new-guix-revision-job id)))))))))))))
+ (run-fibers
+ (lambda ()
+ (process-load-new-guix-revision-job
+ id #:parallelism 1))
+ #:hz 0
+ #:parallelism 1))))))))))))))
(exec-query conn "TRUNCATE guix_revisions CASCADE")
(exec-query conn "TRUNCATE load_new_guix_revision_jobs CASCADE")
@@ -131,23 +139,17 @@
(mock
((guix-data-service jobs load-new-guix-revision)
- setup-logging
- (lambda (conn thunk)
- (thunk)))
-
- (mock
- ((guix-data-service jobs load-new-guix-revision)
- channel-derivations-by-system->guix-store-item
- (lambda (channel-derivations-by-system)
- #f))
+ channel-derivations-by-system->guix-store-item
+ (lambda (channel-derivations-by-system)
+ #f))
- (match (enqueue-load-new-guix-revision-job
- conn
- (git-repository-url->git-repository-id conn "test-url")
- "test-commit"
- "test-source")
- ((id)
- (process-load-new-guix-revision-job id)))))))))
+ (match (enqueue-load-new-guix-revision-job
+ conn
+ (git-repository-url->git-repository-id conn "test-url")
+ "test-commit"
+ "test-source")
+ ((id)
+ (process-load-new-guix-revision-job id))))))))
(exec-query conn "TRUNCATE load_new_guix_revision_jobs CASCADE")
@@ -178,12 +180,6 @@
channel-derivations-by-system)
0))
- (mock
- ((guix-data-service jobs load-new-guix-revision)
- setup-logging
- (lambda (conn thunk)
- (thunk)))
-
(mock
((guix-data-service jobs load-new-guix-revision)
channel-derivations-by-system->guix-store-item
@@ -212,7 +208,7 @@
"test-commit"
"test-source")
((id)
- (process-load-new-guix-revision-job id)))))))))))
+ (process-load-new-guix-revision-job id))))))))))
(exec-query conn "TRUNCATE load_new_guix_revision_jobs CASCADE")