diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-06-25 23:30:07 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-06-26 16:19:53 +0200 |
commit | 95c2bc49cf9691b95f604ed18c7b6dcdb93f9278 (patch) | |
tree | f4c54112480045294049816435bf36866daa7b7a /tests | |
parent | 5813a0c94f92d5b5d3360eac5a0d61314131a84a (diff) | |
download | guix-95c2bc49cf9691b95f604ed18c7b6dcdb93f9278.tar.gz |
tests: Skip lint tests when HTTP server cannot listen.
This could happen when running tests in parallel. * tests/lint.scm ("github-url") ("github-url: one suggestion") ("github-url: already the correct github url") ("archival: missing content") ("archival: content available") ("archival: missing revision") ("archival: revision available") ("archival: rate limit reached"): Add 'test-skip' statement above.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lint.scm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/lint.scm b/tests/lint.scm index 9d3c349fc5..ac174f9f23 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -737,6 +737,7 @@ (single-lint-warning-message (check-mirror-url (dummy-package "x" (source source)))))) +(test-skip (if (http-server-can-listen?) 0 1)) (test-equal "github-url" '() (with-http-server `((200 ,%long-string)) @@ -748,6 +749,7 @@ (sha256 %null-sha256))))))) (let ((github-url "https://github.com/foo/bar/bar-1.0.tar.gz")) + (test-skip (if (http-server-can-listen?) 0 1)) (test-equal "github-url: one suggestion" (string-append "URL should be '" github-url "'") @@ -770,6 +772,8 @@ (method url-fetch) (uri (%local-url)) (sha256 %null-sha256)))))))))))) + + (test-skip (if (http-server-can-listen?) 0 1)) (test-equal "github-url: already the correct github url" '() (check-github-url @@ -893,6 +897,7 @@ '() (check-formatting (dummy-package "x"))) +(test-skip (if (http-server-can-listen?) 0 1)) (test-assert "archival: missing content" (let* ((origin (origin (method url-fetch) @@ -904,6 +909,7 @@ (source origin))))))) (warning-contains? "not archived" warnings))) +(test-skip (if (http-server-can-listen?) 0 1)) (test-equal "archival: content available" '() (let* ((origin (origin @@ -917,6 +923,7 @@ (parameterize ((%swh-base-url (%local-url))) (check-archival (dummy-package "x" (source origin))))))) +(test-skip (if (http-server-can-listen?) 0 1)) (test-assert "archival: missing revision" (let* ((origin (origin (method git-fetch) @@ -936,6 +943,7 @@ (check-archival (dummy-package "x" (source origin))))))) (warning-contains? "scheduled" warnings))) +(test-skip (if (http-server-can-listen?) 0 1)) (test-equal "archival: revision available" '() (let* ((origin (origin @@ -951,6 +959,7 @@ (parameterize ((%swh-base-url (%local-url))) (check-archival (dummy-package "x" (source origin))))))) +(test-skip (if (http-server-can-listen?) 0 1)) (test-assert "archival: rate limit reached" ;; We should get a single warning stating that the rate limit was reached, ;; and nothing more, in particular no other HTTP requests. |