aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lint.scm20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/lint.scm b/tests/lint.scm
index ac174f9f23..83becb655a 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -698,6 +698,26 @@
(lint-warning-message second-warning)))))))))
(test-skip (if (http-server-can-listen?) 0 1))
+(test-equal "source, git-reference: 301 -> 200"
+ "permanent redirect from http://localhost:10000/foo/bar to http://localhost:9999/foo/bar"
+ (with-http-server `((200 ,%long-string))
+ (let* ((initial-url (%local-url))
+ (redirect (build-response #:code 301
+ #:headers
+ `((location
+ . ,(string->uri initial-url))))))
+ (parameterize ((%http-server-port (+ 1 (%http-server-port))))
+ (with-http-server `((,redirect ""))
+ (let ((pkg (dummy-package
+ "x"
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference (url (%local-url))
+ (commit "v1.0.0")))
+ (sha256 %null-sha256))))))
+ (single-lint-warning-message (check-source pkg))))))))
+
+(test-skip (if (http-server-can-listen?) 0 1))
(test-equal "source: 301 -> 404"
"URI http://localhost:10000/foo/bar not reachable: 404 (\"Such is life\")"
(with-http-server '((404 "booh!"))
0200'>2022-04-11gnu: hwloc: Remove input labels.Ludovic Courtès 2022-04-11gnu: hwloc@1: Update to 1.11.13.Philippe SWARTVAGHER 2022-03-29gnu: openmpi: Update to 4.1.2Philippe SWARTVAGHER 2022-03-25gnu: hwloc: Update to 2.7.1.Philippe SWARTVAGHER 2022-01-17gnu: mpich: Remove input labels and trailing #t in phases.Ludovic Courtès 2022-01-17gnu: mpich: Allow compilation with GCC 10.Ludovic Courtès 2021-12-17gnu: hwloc: Update to 2.7.0.Philippe SWARTVAGHER 2021-12-13gnu: Simplify package inputs.Ludovic Courtès 2021-12-05Merge remote-tracking branch 'origin/master' into core-updates-frozenRicardo Wurmus 2021-12-02gnu: Add openmpi-c++.Ricardo Wurmus