diff options
author | Danjela Lura <danielaluraa@gmail.com> | 2020-06-06 18:20:14 +0200 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-06-07 20:17:03 +0100 |
commit | 480d718fa8a6d8e5b4e84703b5ca84669bb8a38f (patch) | |
tree | 6c2c50552fc486357df17d518f5858fa913fdd80 | |
parent | 533bf91ab1456e984cfd021f68a27c6598e5f948 (diff) | |
download | data-service-480d718fa8a6d8e5b4e84703b5ca84669bb8a38f.tar data-service-480d718fa8a6d8e5b4e84703b5ca84669bb8a38f.tar.gz |
Fix lint checker tests
Signed-off-by: Christopher Baines <mail@cbaines.net>
-rw-r--r-- | guix-data-service/model/lint-checker.scm | 3 | ||||
-rw-r--r-- | tests/model-lint-checker.scm | 16 |
2 files changed, 14 insertions, 5 deletions
diff --git a/guix-data-service/model/lint-checker.scm b/guix-data-service/model/lint-checker.scm index 133984d..6603bbb 100644 --- a/guix-data-service/model/lint-checker.scm +++ b/guix-data-service/model/lint-checker.scm @@ -24,7 +24,8 @@ lint-warning-count-by-lint-checker-for-revision insert-guix-revision-lint-checkers 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) (insert-missing-data-and-return-all-ids diff --git a/tests/model-lint-checker.scm b/tests/model-lint-checker.scm index 18679cc..e6740b1 100644 --- a/tests/model-lint-checker.scm +++ b/tests/model-lint-checker.scm @@ -6,10 +6,6 @@ (test-begin "test-model-lint-checker") -(define data - '((name-1 "description-1" #t) - (name-2 "description-2" #f))) - (with-postgresql-connection "test-model-lint-checker" (lambda (conn) @@ -19,6 +15,12 @@ (with-postgresql-transaction 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) (((? number? id1) (? number? id2)) #t))) @@ -28,6 +30,12 @@ (with-postgresql-transaction 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) (((? number? id1) (? number? id2)) (match (lint-checkers->lint-checker-ids conn data) |