Fix lint checker tests
Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
parent
533bf91ab1
commit
480d718fa8
2 changed files with 14 additions and 5 deletions
|
|
@ -24,7 +24,8 @@
|
||||||
lint-warning-count-by-lint-checker-for-revision
|
lint-warning-count-by-lint-checker-for-revision
|
||||||
insert-guix-revision-lint-checkers
|
insert-guix-revision-lint-checkers
|
||||||
lint-checkers-for-revision
|
lint-checkers-for-revision
|
||||||
lint-checker-description-data->lint-checker-description-set-id))
|
lint-checker-description-data->lint-checker-description-set-id
|
||||||
|
insert-lint-checker-description-set))
|
||||||
|
|
||||||
(define (lint-checkers->lint-checker-ids conn lint-checkers-data)
|
(define (lint-checkers->lint-checker-ids conn lint-checkers-data)
|
||||||
(insert-missing-data-and-return-all-ids
|
(insert-missing-data-and-return-all-ids
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,6 @@
|
||||||
|
|
||||||
(test-begin "test-model-lint-checker")
|
(test-begin "test-model-lint-checker")
|
||||||
|
|
||||||
(define data
|
|
||||||
'((name-1 "description-1" #t)
|
|
||||||
(name-2 "description-2" #f)))
|
|
||||||
|
|
||||||
(with-postgresql-connection
|
(with-postgresql-connection
|
||||||
"test-model-lint-checker"
|
"test-model-lint-checker"
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
|
|
@ -19,6 +15,12 @@
|
||||||
(with-postgresql-transaction
|
(with-postgresql-transaction
|
||||||
conn
|
conn
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
|
(define data
|
||||||
|
`((name-1 #t ,(string->number (insert-lint-checker-description-set
|
||||||
|
conn '(37))))
|
||||||
|
(name-2 #f ,(string->number (insert-lint-checker-description-set
|
||||||
|
conn '(38))))))
|
||||||
|
|
||||||
(match (lint-checkers->lint-checker-ids conn data)
|
(match (lint-checkers->lint-checker-ids conn data)
|
||||||
(((? number? id1) (? number? id2))
|
(((? number? id1) (? number? id2))
|
||||||
#t)))
|
#t)))
|
||||||
|
|
@ -28,6 +30,12 @@
|
||||||
(with-postgresql-transaction
|
(with-postgresql-transaction
|
||||||
conn
|
conn
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
|
(define data
|
||||||
|
`((name-1 #t ,(string->number (insert-lint-checker-description-set
|
||||||
|
conn '(37))))
|
||||||
|
(name-2 #f ,(string->number (insert-lint-checker-description-set
|
||||||
|
conn '(38))))))
|
||||||
|
|
||||||
(match (lint-checkers->lint-checker-ids conn data)
|
(match (lint-checkers->lint-checker-ids conn data)
|
||||||
(((? number? id1) (? number? id2))
|
(((? number? id1) (? number? id2))
|
||||||
(match (lint-checkers->lint-checker-ids conn data)
|
(match (lint-checkers->lint-checker-ids conn data)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue