forked from lix-project/hydra
* Start of a regression test for Hydra.
This commit is contained in:
parent
a2fabdd976
commit
c42c675a42
41
release.nix
41
release.nix
|
@ -1,5 +1,5 @@
|
|||
{ nixpkgs ? ../nixpkgs
|
||||
, hydraSrc ? {outPath = ./.; rev = 1234;}
|
||||
, hydraSrc ? {outPath = ../hydra-wc; rev = 1234;}
|
||||
, officialRelease ? false
|
||||
}:
|
||||
|
||||
|
@ -118,4 +118,43 @@ rec {
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
tests =
|
||||
{ nixos ? ../nixos, system ? "x86_64-linux" }:
|
||||
|
||||
let hydra = build { inherit system; }; in
|
||||
|
||||
with import "${nixos}/lib/testing.nix" { inherit nixpkgs system; services = null; };
|
||||
|
||||
{
|
||||
|
||||
install = simpleTest {
|
||||
|
||||
machine =
|
||||
{ config, pkgs, ... }:
|
||||
{ services.postgresql.enable = true;
|
||||
environment.systemPackages = [ hydra ];
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->waitForJob("postgresql");
|
||||
|
||||
# Initialise the database and the state.
|
||||
$machine->mustSucceed
|
||||
( "createdb -O root hydra",
|
||||
, "psql hydra -f ${hydra}/share/hydra/sql/hydra-postgresql.sql"
|
||||
, "mkdir /var/lib/hydra"
|
||||
);
|
||||
|
||||
# Start the web interface.
|
||||
#$machine->mustSucceed("HYDRA_DATA=/var/lib/hydra HYDRA_DBI='dbi:Pg:dbname=hydra;user=hydra;' hydra_server.pl >&2 &");
|
||||
#$machine->waitForOpenPort("3000");
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue