From 9e01fa26db4c42c2b71ef3a4da2876945df1293d Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Mon, 3 Aug 2009 11:07:07 -0400 Subject: [PATCH] Check table perms --- t/02_same_schema.t | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/t/02_same_schema.t b/t/02_same_schema.t index 3713c3b90..9514e2507 100644 --- a/t/02_same_schema.t +++ b/t/02_same_schema.t @@ -6,7 +6,7 @@ use 5.006; use strict; use warnings; use Data::Dumper; -use Test::More tests => 45; +use Test::More tests => 46; use lib 't','.'; use CP_Testing; @@ -139,6 +139,17 @@ like ($cp1->run($stdargs), $dbh1->do(q{DROP TABLE table_2_only}); $dbh2->do(q{DROP TABLE table_2_only}); +$t = qq{$S fails when tables have different permissions}; +$dbh1->do(q{CREATE TABLE table_permtest (a int)}); +$dbh2->do(q{CREATE TABLE table_permtest (a int)}); +$dbh1->do(q{REVOKE insert ON table_permtest FROM public}); +like ($cp1->run($stdargs), + qr{^$label CRITICAL.*Items not matched: 1 .*Table "public.table_permtest" .* but \(none\) perms on 2}, + $t); + +$dbh1->do(q{DROP TABLE table_permtest}); +$dbh2->do(q{DROP TABLE table_permtest}); + #/////////// Sequences $t = qq{$S fails when first schema has an extra sequence}; -- 2.39.5