tests: Avoid now-deprecated 'make-struct'.
* tests/cve.scm (vulnerability): Use 'make-struct/no-tail' instead of 'make-struct', which is deprecated. * tests/lint.scm ("cve: one vulnerability") ("cve: one patched vulnerability") ("cve: known safe from vulnerability") ("cve: vulnerability fixed in replacement version") ("cve: patched vulnerability in replacement"): Likewise.master
parent
d04285647d
commit
79c03e55e2
|
@ -25,7 +25,7 @@
|
||||||
(search-path %load-path "tests/cve-sample.xml"))
|
(search-path %load-path "tests/cve-sample.xml"))
|
||||||
|
|
||||||
(define (vulnerability id packages)
|
(define (vulnerability id packages)
|
||||||
(make-struct (@@ (guix cve) <vulnerability>) 0 id packages))
|
(make-struct/no-tail (@@ (guix cve) <vulnerability>) id packages))
|
||||||
|
|
||||||
(define %expected-vulnerabilities
|
(define %expected-vulnerabilities
|
||||||
;; What we should get when reading %SAMPLE.
|
;; What we should get when reading %SAMPLE.
|
||||||
|
|
|
@ -758,7 +758,7 @@
|
||||||
"probably vulnerable to CVE-2015-1234"
|
"probably vulnerable to CVE-2015-1234"
|
||||||
(mock ((guix lint) package-vulnerabilities
|
(mock ((guix lint) package-vulnerabilities
|
||||||
(lambda (package)
|
(lambda (package)
|
||||||
(list (make-struct (@@ (guix cve) <vulnerability>) 0
|
(list (make-struct/no-tail (@@ (guix cve) <vulnerability>)
|
||||||
"CVE-2015-1234"
|
"CVE-2015-1234"
|
||||||
(list (cons (package-name package)
|
(list (cons (package-name package)
|
||||||
(package-version package)))))))
|
(package-version package)))))))
|
||||||
|
@ -769,7 +769,7 @@
|
||||||
'()
|
'()
|
||||||
(mock ((guix lint) package-vulnerabilities
|
(mock ((guix lint) package-vulnerabilities
|
||||||
(lambda (package)
|
(lambda (package)
|
||||||
(list (make-struct (@@ (guix cve) <vulnerability>) 0
|
(list (make-struct/no-tail (@@ (guix cve) <vulnerability>)
|
||||||
"CVE-2015-1234"
|
"CVE-2015-1234"
|
||||||
(list (cons (package-name package)
|
(list (cons (package-name package)
|
||||||
(package-version package)))))))
|
(package-version package)))))))
|
||||||
|
@ -785,7 +785,7 @@
|
||||||
'()
|
'()
|
||||||
(mock ((guix lint) package-vulnerabilities
|
(mock ((guix lint) package-vulnerabilities
|
||||||
(lambda (package)
|
(lambda (package)
|
||||||
(list (make-struct (@@ (guix cve) <vulnerability>) 0
|
(list (make-struct/no-tail (@@ (guix cve) <vulnerability>)
|
||||||
"CVE-2015-1234"
|
"CVE-2015-1234"
|
||||||
(list (cons (package-name package)
|
(list (cons (package-name package)
|
||||||
(package-version package)))))))
|
(package-version package)))))))
|
||||||
|
@ -800,7 +800,7 @@
|
||||||
(lambda (package)
|
(lambda (package)
|
||||||
(match (package-version package)
|
(match (package-version package)
|
||||||
("0"
|
("0"
|
||||||
(list (make-struct (@@ (guix cve) <vulnerability>) 0
|
(list (make-struct/no-tail (@@ (guix cve) <vulnerability>)
|
||||||
"CVE-2015-1234"
|
"CVE-2015-1234"
|
||||||
(list (cons (package-name package)
|
(list (cons (package-name package)
|
||||||
(package-version package))))))
|
(package-version package))))))
|
||||||
|
@ -815,7 +815,7 @@
|
||||||
'()
|
'()
|
||||||
(mock ((guix lint) package-vulnerabilities
|
(mock ((guix lint) package-vulnerabilities
|
||||||
(lambda (package)
|
(lambda (package)
|
||||||
(list (make-struct (@@ (guix cve) <vulnerability>) 0
|
(list (make-struct/no-tail (@@ (guix cve) <vulnerability>)
|
||||||
"CVE-2015-1234"
|
"CVE-2015-1234"
|
||||||
(list (cons (package-name package)
|
(list (cons (package-name package)
|
||||||
(package-version package)))))))
|
(package-version package)))))))
|
||||||
|
|
Reference in New Issue