mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-18 21:46:35 +01:00
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.
This commit is contained in:
parent
5813a0c94f
commit
95c2bc49cf
1 changed files with 9 additions and 0 deletions
|
@ -737,6 +737,7 @@ (define (warning-contains? str warnings)
|
|||
(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 @@ (define (warning-contains? str warnings)
|
|||
(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 @@ (define (warning-contains? str warnings)
|
|||
(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 @@ (define (warning-contains? str warnings)
|
|||
'()
|
||||
(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 @@ (define (warning-contains? str warnings)
|
|||
(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 @@ (define (warning-contains? str warnings)
|
|||
(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 @@ (define (warning-contains? str warnings)
|
|||
(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 @@ (define (warning-contains? str warnings)
|
|||
(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.
|
||||
|
|
Loading…
Reference in a new issue