aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-02-24 21:16:41 +0000
committerChristopher Baines <mail@cbaines.net>2020-02-24 21:16:41 +0000
commitffdde6ba369896cfbe58eb647446e812511d8bd8 (patch)
treee6b881ee02a80f798d940080845fb416e3bdb0fc /tests
parentb337c5fcb2cfca0454f28add31533a25d70641f2 (diff)
downloaddata-service-ffdde6ba369896cfbe58eb647446e812511d8bd8.tar
data-service-ffdde6ba369896cfbe58eb647446e812511d8bd8.tar.gz
Check that the test database is being used in all the tests
Diffstat (limited to 'tests')
-rw-r--r--tests/branch-updated-emails.scm2
-rw-r--r--tests/jobs-load-new-guix-revision.scm2
-rw-r--r--tests/model-derivation.scm2
-rw-r--r--tests/model-git-branch.scm2
-rw-r--r--tests/model-git-repository.scm2
-rw-r--r--tests/model-license-set.scm2
-rw-r--r--tests/model-license.scm2
-rw-r--r--tests/model-lint-checker.scm2
-rw-r--r--tests/model-lint-warning-message.scm2
-rw-r--r--tests/model-package-metadata.scm2
-rw-r--r--tests/model-package.scm2
11 files changed, 22 insertions, 0 deletions
diff --git a/tests/branch-updated-emails.scm b/tests/branch-updated-emails.scm
index b9c92b2..4fd23b7 100644
--- a/tests/branch-updated-emails.scm
+++ b/tests/branch-updated-emails.scm
@@ -109,6 +109,8 @@ Summary of changes:
(with-postgresql-connection
"test-branch-updated-emails"
(lambda (conn)
+ (check-test-database! conn)
+
(test-assert "enqueue-job-for-email works"
(with-postgresql-transaction
conn
diff --git a/tests/jobs-load-new-guix-revision.scm b/tests/jobs-load-new-guix-revision.scm
index fc571dc..835c0ab 100644
--- a/tests/jobs-load-new-guix-revision.scm
+++ b/tests/jobs-load-new-guix-revision.scm
@@ -17,6 +17,8 @@
(with-postgresql-connection
"test-jobs-load-new-guix-revision"
(lambda (conn)
+ (check-test-database! conn)
+
(exec-query conn "TRUNCATE guix_revisions CASCADE")
(test-equal "select-job-for-commit works"
diff --git a/tests/model-derivation.scm b/tests/model-derivation.scm
index e02ff50..c396c84 100644
--- a/tests/model-derivation.scm
+++ b/tests/model-derivation.scm
@@ -8,6 +8,8 @@
(with-postgresql-connection
"test-model-derivation"
(lambda (conn)
+ (check-test-database! conn)
+
(test-equal "valid-systems"
'("aarch64-linux" "armhf-linux" "i686-linux" "mips64el-linux" "x86_64-linux")
(valid-systems conn))
diff --git a/tests/model-git-branch.scm b/tests/model-git-branch.scm
index c69f69d..46412bc 100644
--- a/tests/model-git-branch.scm
+++ b/tests/model-git-branch.scm
@@ -10,6 +10,8 @@
(with-postgresql-connection
"test-module-git-branch"
(lambda (conn)
+ (check-test-database! conn)
+
(test-assert "insert-git-branch-entry works"
(with-postgresql-transaction
conn
diff --git a/tests/model-git-repository.scm b/tests/model-git-repository.scm
index ee72f24..ca43c59 100644
--- a/tests/model-git-repository.scm
+++ b/tests/model-git-repository.scm
@@ -9,6 +9,8 @@
(with-postgresql-connection
"test-model-git-repository"
(lambda (conn)
+ (check-test-database! conn)
+
(test-assert "returns an id for a non existent URL"
(with-postgresql-transaction
conn
diff --git a/tests/model-license-set.scm b/tests/model-license-set.scm
index c39171f..62fd899 100644
--- a/tests/model-license-set.scm
+++ b/tests/model-license-set.scm
@@ -27,6 +27,8 @@
(with-postgresql-connection
"test-model-license-set"
(lambda (conn)
+ (check-test-database! conn)
+
(with-postgresql-transaction
conn
(lambda (conn)
diff --git a/tests/model-license.scm b/tests/model-license.scm
index 8f4b0c3..9e9d8b2 100644
--- a/tests/model-license.scm
+++ b/tests/model-license.scm
@@ -28,6 +28,8 @@
(with-postgresql-connection
"test-model-license"
(lambda (conn)
+ (check-test-database! conn)
+
(with-postgresql-transaction
conn
(lambda (conn)
diff --git a/tests/model-lint-checker.scm b/tests/model-lint-checker.scm
index bbc79de..18679cc 100644
--- a/tests/model-lint-checker.scm
+++ b/tests/model-lint-checker.scm
@@ -13,6 +13,8 @@
(with-postgresql-connection
"test-model-lint-checker"
(lambda (conn)
+ (check-test-database! conn)
+
(test-assert "single insert"
(with-postgresql-transaction
conn
diff --git a/tests/model-lint-warning-message.scm b/tests/model-lint-warning-message.scm
index 746dcca..7231a34 100644
--- a/tests/model-lint-warning-message.scm
+++ b/tests/model-lint-warning-message.scm
@@ -13,6 +13,8 @@
(with-postgresql-connection
"test-model-lint-checker"
(lambda (conn)
+ (check-test-database! conn)
+
(test-assert "single insert"
(with-postgresql-transaction
conn
diff --git a/tests/model-package-metadata.scm b/tests/model-package-metadata.scm
index 21ca55b..d80d6fd 100644
--- a/tests/model-package-metadata.scm
+++ b/tests/model-package-metadata.scm
@@ -48,6 +48,8 @@
(with-postgresql-connection
"test-model-package-metadata"
(lambda (conn)
+ (check-test-database! conn)
+
(test-assert "inferior-packages->package-metadata-ids"
(with-postgresql-transaction
conn
diff --git a/tests/model-package.scm b/tests/model-package.scm
index 8029c3b..57a3142 100644
--- a/tests/model-package.scm
+++ b/tests/model-package.scm
@@ -55,6 +55,8 @@
(with-postgresql-connection
"test-model-package"
(lambda (conn)
+ (check-test-database! conn)
+
(with-postgresql-transaction
conn
(lambda (conn)