hydra/tests/query-all-tables.pl.in
2011-03-16 08:50:31 +00:00

20 lines
432 B
Perl

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