My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/nixos/tests/systemd-journal.nix

22 lines
504 B

import ./make-test-python.nix ({ pkgs, ... }:
{
name = "systemd-journal";
meta = with pkgs.lib.maintainers; {
maintainers = [ lewo ];
};
nodes.machine = { pkgs, lib, ... }: {
services.journald.enableHttpGateway = true;
};
testScript = ''
machine.wait_for_unit("multi-user.target")
machine.succeed("journalctl --grep=systemd")
machine.succeed(
"${pkgs.curl}/bin/curl -s localhost:19531/machine | ${pkgs.jq}/bin/jq -e '.hostname == \"machine\"'"
)
'';
})