diff options
Diffstat (limited to 'tests/jobs-load-new-guix-revision.scm')
-rw-r--r-- | tests/jobs-load-new-guix-revision.scm | 82 |
1 files changed, 49 insertions, 33 deletions
diff --git a/tests/jobs-load-new-guix-revision.scm b/tests/jobs-load-new-guix-revision.scm index a2beb64..1a64ce3 100644 --- a/tests/jobs-load-new-guix-revision.scm +++ b/tests/jobs-load-new-guix-revision.scm @@ -37,50 +37,66 @@ (mock ((guix-data-service jobs load-new-guix-revision) - channel->source-and-derivations-by-system - (lambda* (conn store channel fetch-with-authentication? - #:key parallelism) - (cons - "/gnu/store/guix" - '(("x86_64-linux" - . - ((manifest-entry-item . "/gnu/store/foo.drv") - (profile . "/gnu/store/bar.drv"))))))) + open-store-connection + (lambda () + 'fake-store-connection)) (mock ((guix-data-service jobs load-new-guix-revision) - channel-derivations-by-system->guix-store-item - (lambda (store channel-derivations-by-system) - "/gnu/store/test")) + channel->source-and-derivations-by-system + (lambda* (conn store channel fetch-with-authentication? + #:key parallelism) + (cons + "/gnu/store/guix" + '(("x86_64-linux" + . + ((manifest-entry-item . "/gnu/store/foo.drv") + (profile . "/gnu/store/bar.drv"))))))) (mock ((guix-data-service jobs load-new-guix-revision) - extract-information-from - (lambda* (conn store guix-revision-id commit - guix-source store-path - #:key skip-system-tests? - parallelism) - #t)) + channel-derivations-by-system->guix-store-item + (lambda (store channel-derivations-by-system) + "/gnu/store/test")) (mock - ((guix-data-service model channel-instance) - insert-channel-instances - (lambda (conn guix-revision-id derivations-by-system) + ((guix-data-service jobs load-new-guix-revision) + extract-information-from + (lambda* (conn store guix-revision-id commit + guix-source store-path + #:key skip-system-tests? + parallelism) #t)) (mock - ((guix channels) - channel-news-for-commit - (lambda (channel commit) - '())) - - (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)))))))))) + ((guix-data-service model channel-instance) + insert-channel-instances + (lambda (conn guix-revision-id derivations-by-system) + #t)) + + (mock + ((guix channels) + channel-news-for-commit + (lambda (channel commit) + '())) + + (mock + ((guix store) + add-temp-root + (lambda _ #f)) + + (mock + ((guix store) + close-connection + (lambda _ #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))))))))))))) (exec-query conn "TRUNCATE guix_revisions CASCADE") (exec-query conn "TRUNCATE load_new_guix_revision_jobs CASCADE") |