* Start of a regression test for Hydra.

This commit is contained in:
Eelco Dolstra 2010-03-10 15:48:45 +00:00
parent a2fabdd976
commit c42c675a42

View file

@ -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");
'';
};
};
}