From: "Gábor Boskovits" <boskovits@gmail.com>
To: "Clément Lassieur" <clement@lassieur.org>
Cc: 31911-done@debbugs.gnu.org
Subject: [bug#31911] services: Add prometheus-node-exporter-service-type.
Date: Mon, 9 Jul 2018 16:12:37 +0200 [thread overview]
Message-ID: <CAE4v=pgwpfDsWxbbx1Gg2d90Hk7F0d5y+xBN8Z7MssnfXneDSA@mail.gmail.com> (raw)
In-Reply-To: <87sh4s93ai.fsf@lassieur.org>
[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]
Clément Lassieur <clement@lassieur.org> ezt írta (időpont: 2018. júl. 9.,
H, 11:17):
> Hi Gábor,
>
> Gábor Boskovits <boskovits@gmail.com> writes:
>
> > Pushed to master as a33652ee336ae9a5d2ab5fd54bf2397caec42a0e.
>
> > + (test-assert "prometheus-node-exporter running"
> > + (marionette-eval
> > + '(begin
> > + (use-modules (gnu services herd))
> > + (match (start-service 'prometheus-node-exporter)
> > + (#f #f)
> > + (('service response-parts ...)
> > + (match (assq-ref response-parts 'running)
> > + ((pid) (number? pid))))))
> > + marionette))
>
> The PID check is useless because START-SERVICE will return #f if the
> service fails to start. Instead, I'd use:
>
> (test-assert "prometheus-node-exporter running"
> (marionette-eval
> '(begin
> (use-modules (gnu services herd))
> (start-service 'prometheus-node-exporter))
> marionette))
>
> This would also make the test more robust to service changes (e.g. it
> would still work if MAKE-FORKEXEC-CONSTRUCTOR is removed).
>
>
Thanks, I will adjust accordingly. Incidentally the code is almost the same
as in hpcguix-web test. Should we also adjust that?
> Clément
>
[-- Attachment #2: Type: text/html, Size: 2116 bytes --]
next prev parent reply other threads:[~2018-07-09 14:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-20 12:59 [bug#31911] [PATCH] services: Add prometheus-node-exporter-service-type Gábor Boskovits
2018-06-23 21:51 ` Ludovic Courtès
2018-06-25 8:31 ` Gábor Boskovits
2018-06-25 8:56 ` Ludovic Courtès
2018-07-07 15:54 ` Ludovic Courtès
2018-07-07 18:14 ` Gábor Boskovits
2018-07-09 8:43 ` bug#31911: " Gábor Boskovits
2018-07-09 9:17 ` [bug#31911] " Clément Lassieur
2018-07-09 14:12 ` Gábor Boskovits [this message]
2018-07-09 14:21 ` Clément Lassieur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAE4v=pgwpfDsWxbbx1Gg2d90Hk7F0d5y+xBN8Z7MssnfXneDSA@mail.gmail.com' \
--to=boskovits@gmail.com \
--cc=31911-done@debbugs.gnu.org \
--cc=clement@lassieur.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.