Subject: Re: [bug#30701] [PATCH 2/3] tests: databases: Add a system test for PostgreSQL.

From: Christopher Baines <[email-masked]>
Date: Mon, 05 Mar 2018 19:25:38 +0000

Clément Lassieur <[email-masked]> writes:

> Christopher Baines <[email-masked]> writes:
>
>> * gnu/tests/databases.scm (%postgresql-os, %test-postgresql): New variables.
>>   (run-postgresql-test): New procedure.
>> ---
>>  gnu/tests/databases.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 55 insertions(+)
>>
>> diff --git a/gnu/tests/databases.scm b/gnu/tests/databases.scm
>> index e7097690a..583f484d7 100644
>> --- a/gnu/tests/databases.scm
>> +++ b/gnu/tests/databases.scm
>> @@ -30,6 +30,7 @@
>>    #:use-module (guix store)
>>    #:export (%test-memcached
>>              %test-mongodb
>> +            %test-postgresql
>>              %test-mysql))
>>  
>>  (define %memcached-os
>> @@ -208,6 +209,60 @@
>>     (value (run-mongodb-test))))
>>  
>>  
>> +;;;
>> +;;; The PostgreSQL service.
>> +;;;
>> +
>> +(define %postgresql-os
>> +  (simple-operating-system
>> +   (service postgresql-service-type)))
>> +
>> +(define* (run-postgresql-test)
>
> define, instead of define*
>
>> +  "Run tests in %POSTGRESQL-OS."
>> +  (define os
>> +    (marionette-operating-system
>> +     %postgresql-os
>> +     #:imported-modules '((gnu services herd)
>> +                          (guix combinators))))
>> +
>> +  (define vm
>> +    (virtual-machine
>> +     (operating-system os)
>> +     (memory-size 512)))
>> +
>> +  (define test
>> +    (with-imported-modules '((gnu build marionette))
>> +      #~(begin
>> +          (use-modules (srfi srfi-11) (srfi srfi-64)
>
> I think srfi-11 is useless.

Good spot, I'll make these changes and send some new patches.