summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArun Isaac <arunisaac@systemreboot.net>2019-01-07 23:11:58 +0530
committerArun Isaac <arunisaac@systemreboot.net>2019-01-10 15:39:35 +0530
commit40fa21c22e1d11b741515fd38f5204a5fa57fbaa (patch)
tree4467c710160509287c73d40fc40e646b52d9278b /tests
parent394207c1ee05c4bb148896852f5dd90cdbff4bb5 (diff)
downloadgnu-guix-40fa21c22e1d11b741515fd38f5204a5fa57fbaa.tar
gnu-guix-40fa21c22e1d11b741515fd38f5204a5fa57fbaa.tar.gz
guix: lint: Warn only if GitHub URI is not same as the package URI.
* guix/scripts/lint.scm (check-github-url): Warn only if the GitHub URI obtained after following redirects is not same as the original URI. * tests/lint.scm ("github-url: already the correct github url"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/lint.scm13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/lint.scm b/tests/lint.scm
index fe12bebd88..912a78d111 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2017 Alex Kost <alezost@gmail.com>
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -775,7 +775,16 @@
(method url-fetch)
(uri (%local-url))
(sha256 %null-sha256))))))))))
- github-url)))
+ github-url))
+ (test-assert "github-url: already the correct github url"
+ (string-null?
+ (with-warnings
+ (check-github-url
+ (dummy-package "x" (source
+ (origin
+ (method url-fetch)
+ (uri github-url)
+ (sha256 %null-sha256)))))))))
(test-assert "cve"
(mock ((guix scripts lint) package-vulnerabilities (const '()))