mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
81063ee414
This test allows to ensure the systemd-journal-gatewayd service is responding correcly when the NixOS option `enableHttpGateway` is set. The test has not been added into the main systemd test because a graphical stack is not required (and rebuilding the graphical stack on systemd change is huge).
20 lines
455 B
Nix
20 lines
455 B
Nix
import ./make-test-python.nix ({ pkgs, ... }:
|
|
|
|
{
|
|
name = "systemd-journal";
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
maintainers = [ lewo ];
|
|
};
|
|
|
|
machine = { pkgs, lib, ... }: {
|
|
services.journald.enableHttpGateway = true;
|
|
};
|
|
|
|
testScript = ''
|
|
machine.wait_for_unit("multi-user.target")
|
|
|
|
machine.succeed(
|
|
"${pkgs.curl}/bin/curl -s localhost:19531/machine | ${pkgs.jq}/bin/jq -e '.hostname == \"machine\"'"
|
|
)
|
|
'';
|
|
})
|