diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-12-26 16:03:09 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-12-26 16:03:09 +0100 |
commit | 2bfcdbce51cf09a856ac0e43bb1a554b0110e1df (patch) | |
tree | 9d6a801ec5d6ccedf4ad600e8748b8c9d24315c7 /tests | |
parent | e99d036828bd7d01bfd108f3d5a2f7de61fab32d (diff) | |
parent | 10275b7466853fce6d5b925f0267c20c304ba25a (diff) | |
download | guix-2bfcdbce51cf09a856ac0e43bb1a554b0110e1df.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lint.scm | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/lint.scm b/tests/lint.scm index 300153e24e..d4aa7c0e8e 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -6,6 +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> ;;; ;;; This file is part of GNU Guix. ;;; @@ -669,6 +670,33 @@ (check-mirror-url (dummy-package "x" (source source))))) "mirror://gnu/foo/foo.tar.gz")) +(test-assert "github-url" + (string-null? + (with-warnings + (with-http-server 200 %long-string + (check-github-url + (dummy-package "x" (source + (origin + (method url-fetch) + (uri (%local-url)) + (sha256 %null-sha256))))))))) + +(let ((github-url "https://github.com/foo/bar/bar-1.0.tar.gz")) + (test-assert "github-url: one suggestion" + (string-contains + (with-warnings + (with-http-server (301 `((location . ,(string->uri github-url)))) "" + (let ((initial-uri (%local-url))) + (parameterize ((%http-server-port (+ 1 (%http-server-port)))) + (with-http-server (302 `((location . ,(string->uri initial-uri)))) "" + (check-github-url + (dummy-package "x" (source + (origin + (method url-fetch) + (uri (%local-url)) + (sha256 %null-sha256)))))))))) + github-url))) + (test-assert "cve" (mock ((guix scripts lint) package-vulnerabilities (const '())) (string-null? |