From 541ce56cc69a31147ad1f2b3aa0f5229802bd748 Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Wed, 16 Mar 2011 09:01:09 +0000 Subject: [PATCH] add basic query tests for JobStatus/LatestSucceeded/ActiveJobs --- tests/query-all-tables.pl.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/query-all-tables.pl.in b/tests/query-all-tables.pl.in index ddd315b6..7045748b 100644 --- a/tests/query-all-tables.pl.in +++ b/tests/query-all-tables.pl.in @@ -3,17 +3,21 @@ 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; +use Test::Simple tests => 74; foreach my $source (@sources) { + my $title = "Basic select query for $source"; if( $source !~ m/^(LatestSucceeded|JobStatus|ActiveJobs)/) { - ok(scalar($db->resultset($source)->search({},{})) == 0, "Basic select query for $source"); + ok(scalar($db->resultset($source)->all) == 0, $title); + } + else { + ok(scalar($db->resultset($source)->search({},{ bind => ["", "", ""] })) == 0, $title); } } +