Subject: [bug#67963] [PATCH v2 32/37] gnu: Add perl-dbicx-testdatabase.

From: Felix Lechner <[email-masked]>
Date: Tue, 16 Jan 2024 14:13:10 -0800

* gnu/packages/databases.scm (perl-dbicx-testdatabase): New variable.

Change-Id: I5b923f8eff54e32ae7e7c7b0bad508006f8803c7
---
 gnu/packages/databases.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 5ff23ba63d..95b8d5b50f 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1936,6 +1936,35 @@ (define-public perl-dbi
     (home-page "https://metacpan.org/release/DBI")
     (license license:perl-license)))
 
+(define-public perl-dbicx-testdatabase
+  (package
+    (name "perl-dbicx-testdatabase")
+    (version "0.05")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://cpan/authors/id/J/JR/JROCKWAY/DBICx-TestDatabase-"
+             version ".tar.gz"))
+       (sha256
+        (base32 "1kqaiygxiarrqkgqbq1s3xilx77msbdsqrdaqf4628811d9w4fwf"))))
+    (build-system perl-build-system)
+    (arguments
+     (list
+      #:tests? #f))
+    (native-inputs (list perl-dbix-class
+                         perl-module-install))
+    (propagated-inputs (list perl-dbd-sqlite
+                             perl-sql-translator))
+    (home-page "https://metacpan.org/release/DBICx-TestDatabase")
+    (synopsis "Create temporary database from a DBIx::Class::Schema")
+    (description "This module creates a temporary SQLite database, deploys
+a DBIC schema, and then connects to the database.  It lets you test your
+DBIC schema.  Since you have a fresh database for every test, you don't
+have to worry about cleaning up after your tests, or about the ordering
+of tests affecting failure.")
+    (license license:perl-license)))
+
 (define-public perl-dbix-class
   (package
     (name "perl-dbix-class")
-- 
2.41.0