first test, not yet in buildprocess
This commit is contained in:
parent
87d1b447c2
commit
0df0723b46
|
@ -64,6 +64,9 @@ AC_CONFIG_FILES([
|
||||||
src/script/hydra_queue_runner.pl
|
src/script/hydra_queue_runner.pl
|
||||||
src/script/hydra_server.pl
|
src/script/hydra_server.pl
|
||||||
src/script/hydra_update_gc_roots.pl
|
src/script/hydra_update_gc_roots.pl
|
||||||
|
|
||||||
|
tests/Makefile
|
||||||
|
tests/query-all-tables.pl
|
||||||
])
|
])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
|
|
1
deps.nix
1
deps.nix
|
@ -39,5 +39,6 @@ in
|
||||||
perlPackages.DateTime
|
perlPackages.DateTime
|
||||||
perlPackages.DigestSHA1
|
perlPackages.DigestSHA1
|
||||||
perlPackages.CryptRandPasswd
|
perlPackages.CryptRandPasswd
|
||||||
|
perlPackages.TestMore
|
||||||
nixPerl
|
nixPerl
|
||||||
]
|
]
|
||||||
|
|
8
tests/Makefile.am
Normal file
8
tests/Makefile.am
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
TESTS = \
|
||||||
|
query-all-tables.pl
|
||||||
|
|
||||||
|
$(TESTS) : db.sqlite
|
||||||
|
|
||||||
|
db.sqlite : $(srcdir)/src/sql/hydra-sqlite.sql
|
||||||
|
sqlite3 db.sqlite < $(srcdir)/src/sql/hydra-sqlite.sql
|
||||||
|
|
19
tests/query-all-tables.pl.in
Normal file
19
tests/query-all-tables.pl.in
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#! @perl@ -w -I@nix@/libexec/nix
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use Hydra::Schema;
|
||||||
|
use Hydra::Helper::Nix;
|
||||||
|
use Hydra::Helper::AddBuilds;
|
||||||
|
|
||||||
|
my $db = openHydraDB;
|
||||||
|
|
||||||
|
my @sources = $db->sources;
|
||||||
|
my $nrtables = scalar(@sources);
|
||||||
|
|
||||||
|
use Test::Simple tests => 62;
|
||||||
|
|
||||||
|
foreach my $source (@sources) {
|
||||||
|
if( $source !~ m/^(LatestSucceeded|JobStatus|ActiveJobs)/) {
|
||||||
|
ok(scalar($db->resultset($source)->search({},{})) == 0, "Basic select query for $source");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue