[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to test modified shepherd services
From: |
Maxim Cournoyer |
Subject: |
Re: How to test modified shepherd services |
Date: |
Sun, 26 Dec 2021 22:20:21 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hello,
Simon South <simon@simonsouth.net> writes:
> Nathan Dehnel <ncdehnel@gmail.com> writes:
>> I modified a shepherd service to accept a new field from config.scm
>> and I was wondering how to test that it works correctly.
>
> Assuming this is an existing Guix service, it's probably easiest to
> update the corresponding system test suite under gnu/tests (if
> necessary) to reflect your change, then run the suite with "make
> check-system" (setting "TESTS" to limit it to the service in question)
> to make sure everything works the way you expect.
>
> If you're planning on contributing the change to Guix it would be good
> to submit it along with an updated test suite anyway.
>
> The Guix manual has a bit of information about this in Section 2.3,
> "Running the Test Suite":
>
> https://guix.gnu.org/en/manual/en/html_node/Running-the-Test-Suite.html#Running-the-Test-Suite
+1. System tests are the best way to validate system services. You'll
save time by writing/extending one.
Maxim