-#!/usr/bin/perl -w
+#!perl
## Test the "pgagent_jobs" action
use strict;
use warnings;
use Test::More tests => 48;
-#use Test::More 'no_plan';
use lib 't','.';
use CP_Testing;
# Set up a dummy pgagent schema.
$dbh->{AutoCommit} = 1;
+
+$dbh->do('DROP SCHEMA pgagent CASCADE');
+
$dbh->do(q{
SET client_min_messages TO warning;
+
CREATE SCHEMA pgagent;
CREATE TABLE pgagent.pga_job (
qr{^$label CRITICAL: DB "postgres" [()][^)]+[)] 255 Restore/analyze: WTF!},
"$S -w=5h -c=5h returns critical with failed job within our time";
-# Go back futher in time!
+# Go back further in time!
like $cp->run('-w=30h -c=2h'),
qr{^$label WARNING: DB "postgres" [()][^)]+[)] 255 Restore/analyze: WTF!},
"$S -w=30h -c=5h returns warning for older failed job";