Hi,

phodina <phod...@protonmail.com> writes:

> Hi there,
>
> I'm curious what development workflow do you use for implementing a service.
>
> Here's mine:
>
> 0 define a new service in my channel services directory
> 1 add this new service in definition of OS
> 2 use guix system container to build container image with --load-path
> pointing to the local channel with the service
> 3 run the newly created container
> 4 check with the herd status the service is running
> 5 check and interact with the service itself
> 6 iterate till satisfaction
> 7 git & peace :-)

Due to bugs in Shepherd services having the potential to hang Shepherd,
and because such bugs are critical to catch, test driven development
seems to work best.  It also provides a faster iteration loop that the
above flow.

I wrote a jami-service-type recently, and that was a very good example
of a service that I needed tests for, as it was very tricky to get all
the parts right and needed a lot of debugging.

The operating system to test could be made a 'guix system vm' and I'd
SSH into it at times to manually test things.

The (huge) commit for jami-service-type was
10f554700c417b84c22c56fdd007567a52c45d75; you can refer to it to see how
I implemented the tests.  The other service modules are of course very
useful too!

Hope it helps!

Maxim

Reply via email to