[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/10: lint: Add test for 'source'.
From: |
guix-commits |
Subject: |
07/10: lint: Add test for 'source'. |
Date: |
Fri, 19 Jul 2019 19:32:31 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 99b204281235a2b6a44d949e08bc517188b21e49
Author: Ludovic Courtès <address@hidden>
Date: Sat Jul 20 01:18:11 2019 +0200
lint: Add test for 'source'.
* tests/lint.scm ("source: 404 and 200"): New test.
---
tests/lint.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/tests/lint.scm b/tests/lint.scm
index 5127a84..8a9023a 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -619,6 +619,23 @@
(lint-warning-message second-warning))))))
(test-skip (if (http-server-can-listen?) 0 1))
+(test-equal "source: 404 and 200"
+ '()
+ (with-http-server 404 %long-string
+ (let ((bad-url (%local-url)))
+ (parameterize ((%http-server-port (+ 1 (%http-server-port))))
+ (with-http-server 200 %long-string
+ (let ((pkg (package
+ (inherit (dummy-package "x"))
+ (source (origin
+ (method url-fetch)
+ (uri (list bad-url (%local-url)))
+ (sha256 %null-sha256))))))
+ ;; Since one of the two URLs is good, this should return the empty
+ ;; list.
+ (check-source pkg)))))))
+
+(test-skip (if (http-server-can-listen?) 0 1))
(test-equal "source: 301 -> 200"
"permanent redirect from http://localhost:10000/foo/bar to
http://localhost:9999/foo/bar"
(with-http-server 200 %long-string
- branch master updated (dd9560a -> 3d33c93), guix-commits, 2019/07/19
- 01/10: gnu: python-jupyter-client: Patch file name of 'ip'., guix-commits, 2019/07/19
- 03/10: ui: 'warn-about-load-error' provides hints for unbound variables., guix-commits, 2019/07/19
- 02/10: ui: 'warn-about-load-error' warns about file/module name mismatches., guix-commits, 2019/07/19
- 04/10: gnu: Add emacs-zerodark-theme., guix-commits, 2019/07/19
- 05/10: lint: Update tests to (guix lint) migration., guix-commits, 2019/07/19
- 06/10: lint: 'source' check no longer complains about unavailable mirrors., guix-commits, 2019/07/19
- 08/10: lint: Remove unused imports., guix-commits, 2019/07/19
- 07/10: lint: Add test for 'source'.,
guix-commits <=
- 10/10: lint: Use the 'warning' procedure for messages., guix-commits, 2019/07/19
- 09/10: lint: source: Stop as soon as a valid URL is found., guix-commits, 2019/07/19