mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
channels: Error out when the 'guix' channel lacks an introduction.
* guix/channels.scm (latest-channel-instance): Raise an error instead of warning when 'guix is unauthenticated. * tests/channels.scm ("latest-channel-instances, missing introduction for 'guix'"): New test.
This commit is contained in:
parent
0a8dd8aae5
commit
ead5c46147
2 changed files with 31 additions and 3 deletions
|
@ -402,6 +402,27 @@
|
|||
(channel-news-for-commit channel commit5 commit1))
|
||||
'(#f "tag-for-first-news-entry")))))))
|
||||
|
||||
(unless (which (git-command)) (test-skip 1))
|
||||
(test-assert "latest-channel-instances, missing introduction for 'guix'"
|
||||
(with-temporary-git-repository directory
|
||||
'((add "a.txt" "A")
|
||||
(commit "first commit")
|
||||
(add "b.scm" "#t")
|
||||
(commit "second commit"))
|
||||
(with-repository directory repository
|
||||
(let* ((commit1 (find-commit repository "first"))
|
||||
(commit2 (find-commit repository "second"))
|
||||
(channel (channel (url (string-append "file://" directory))
|
||||
(name 'guix))))
|
||||
|
||||
(guard (c ((message-condition? c)
|
||||
(->bool (string-contains (condition-message c)
|
||||
"introduction"))))
|
||||
(with-store store
|
||||
;; Attempt a downgrade from NEW to OLD.
|
||||
(latest-channel-instances store (list channel))
|
||||
#f))))))
|
||||
|
||||
(unless (gpg+git-available?) (test-skip 1))
|
||||
(test-equal "authenticate-channel, wrong first commit signer"
|
||||
#t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue