From 522c7cd9a2735eb14d823b5dbb0e275854557824 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 11 Feb 2025 10:29:45 +0000 Subject: [PATCH] Remove unmaintainable tests This needs rethinking, it's not feasible to maintain tests if you have to struggle to get backtraces when they fail and they rely on fragile and broken mocking. --- tests/jobs-load-new-guix-revision.scm | 102 -------------------------- 1 file changed, 102 deletions(-) diff --git a/tests/jobs-load-new-guix-revision.scm b/tests/jobs-load-new-guix-revision.scm index 3f968d9..bcd9579 100644 --- a/tests/jobs-load-new-guix-revision.scm +++ b/tests/jobs-load-new-guix-revision.scm @@ -111,108 +111,6 @@ (exec-query conn "TRUNCATE guix_revisions CASCADE") (exec-query conn "TRUNCATE load_new_guix_revision_jobs CASCADE") - (test-equal "test build store item failure" - #f - (mock - ((guix-data-service jobs load-new-guix-revision) - with-store-connection - (lambda (f) - (f 'fake-store-connection))) - - (mock - ((guix-data-service jobs load-new-guix-revision) - channel->source-and-derivations-by-system - (lambda* (conn channel fetch-with-authentication? - #:key parallelism) - (values - "/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) - load-channel-instances - (lambda (git-repository-id commit - channel-derivations-by-system) - 0)) - - (mock - ((guix-data-service jobs load-new-guix-revision) - 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)))))))) - - (exec-query conn "TRUNCATE load_new_guix_revision_jobs CASCADE") - - (test-equal "test extract information failure" - #f - (mock - ((guix-data-service jobs load-new-guix-revision) - with-store-connection - (lambda (f) - (f 'fake-store-connection))) - - (mock - ((guix-data-service jobs load-new-guix-revision) - channel->source-and-derivations-by-system - (lambda* (conn channel fetch-with-authentication? - #:key parallelism) - (values - "/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) - load-channel-instances - (lambda (git-repository-id commit - channel-derivations-by-system) - 0)) - - (mock - ((guix-data-service jobs load-new-guix-revision) - channel-derivations-by-system->guix-store-item - (lambda (channel-derivations-by-system) - "/gnu/store/test")) - - (mock - ((guix-data-service jobs load-new-guix-revision) - extract-information-from - (lambda* (conn git-repository-id commit - guix-source store-path - #:key skip-system-tests? - extra-inferior-environment-variables - parallelism) - #f)) - - (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)))))))))) - - (exec-query conn "TRUNCATE load_new_guix_revision_jobs CASCADE") - (test-assert "test duplicate job handling" (with-postgresql-transaction conn