Subject: Re: [bug#76081] [PATCH v10 5/7] tests: Use lower-oci-image-state in container tests.

From: paul <[email-masked]>
Date: Sun, 1 Jun 2025 03:42:19 +0200

Hi,

On 5/16/25 03:45, Maxim Cournoyer wrote:
> Hi,
>
> Giacomo Leidi <[email-masked]> writes:
>
>> This patch replaces boilerplate in container related tests with
>> oci-image plumbing from (gnu services containers).
>>
>> * gnu/services/containers.scm: Export lower-oci-image-state.
> I don't think that's a nice API to export; you can instead use the
>
> (define lower-oci-image-state
>    (@@ (gnu services containers) lower-oci-image-state)
>
> trick to expose internals (white box testing).
Good point, addressed.
>> * gnu/tests/containers.scm (%oci-tarball): New variable;
>> (run-rootless-podman-test): use %oci-tarball;
>> (build-tarball&run-rootless-podman-test): drop procedure.
>> * gnu/tests/docker.scm (%docker-tarball): New variable;
>> (build-tarball&run-docker-test): use %docker-tarball;
>> (%docker-system-tarball): New variable;
>> (build-tarball&run-docker-system-test): new procedure.
>>
>> Change-Id: Iad6f0704aee188d89464c83722dea0bb7adb084a
>> ---
>>   gnu/services/containers.scm |   2 +
>>   gnu/tests/containers.scm    |  80 ++++++++++++++---------------
>>   gnu/tests/docker.scm        | 100 ++++++++++++++++++++----------------
>>   3 files changed, 95 insertions(+), 87 deletions(-)
> The diffstats suggest the result is not that impactful in terms of
> reducing boilerplate, ah!
I would like to work to a single Scheme API in the future, that can be 
common to guix pack, guix system internals and the oci-service-type 
internals. But yeah the boilerplate is not much less.

v11 should have all your comments addressed, thank you for your review.

cheers,
giacomo