From 480d718fa8a6d8e5b4e84703b5ca84669bb8a38f Mon Sep 17 00:00:00 2001 From: Danjela Lura Date: Sat, 6 Jun 2020 18:20:14 +0200 Subject: Fix lint checker tests Signed-off-by: Christopher Baines --- guix-data-service/model/lint-checker.scm | 3 ++- 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) -- cgit v1.2.3