mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/hydra postgresql: Fix #27314 and add test case
This commit is contained in:
parent
7bba4a169e
commit
d784b83005
3 changed files with 47 additions and 8 deletions
32
nixos/tests/hydra.nix
Normal file
32
nixos/tests/hydra.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "hydra-init-localdb";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ pstn ];
|
||||
};
|
||||
|
||||
machine =
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.hydra = {
|
||||
enable = true;
|
||||
|
||||
#Hydra needs those settings to start up, so we add something not harmfull.
|
||||
hydraURL = "example.com";
|
||||
notificationSender = "example@example.com";
|
||||
};
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
# let the system boot up
|
||||
$machine->waitForUnit("multi-user.target");
|
||||
# test whether the database is running
|
||||
$machine->succeed("systemctl status postgresql.service");
|
||||
# test whether the actual hydra daemons are running
|
||||
$machine->succeed("systemctl status hydra-queue-runner.service");
|
||||
$machine->succeed("systemctl status hydra-init.service");
|
||||
$machine->succeed("systemctl status hydra-evaluator.service");
|
||||
$machine->succeed("systemctl status hydra-send-stats.service");
|
||||
'';
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue