From: Greg Sabino Mullane Date: Mon, 3 Aug 2009 15:07:07 +0000 (-0400) Subject: Check table perms X-Git-Tag: 2.10.0~8 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=9e01fa26db4c42c2b71ef3a4da2876945df1293d;p=check_postgres.git Check table perms --- 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};