[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2953] trunk



Revision: 2953
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2953&view=rev
Author:   einhverfr
Date:     2010-03-09 06:30:14 +0000 (Tue, 09 Mar 2010)

Log Message:
-----------
First permission tests in place

Modified Paths:
--------------
    trunk/sql/modules/test/System.sql
    trunk/t/43-dbtest.t

Modified: trunk/sql/modules/test/System.sql
===================================================================
--- trunk/sql/modules/test/System.sql	2010-03-09 04:52:19 UTC (rev 2952)
+++ trunk/sql/modules/test/System.sql	2010-03-09 06:30:14 UTC (rev 2953)
@@ -41,8 +41,28 @@
 group by proname
 having count(*) > 1;
 
+CREATE TEMPORARY VIEW permissionless_tables AS
+select t.table_catalog, t.table_schema, t.table_type, t.table_name
+from information_schema.tables t
+where t.table_catalog = current_database()
+  and t.table_schema = 'public'
+  and not exists (
+    select *
+    from information_schema.role_table_grants r
+    where r.table_catalog = t.table_catalog
+      and r.table_schema = t.table_schema
+      and r.table_name = t.table_name
+      )
+order by t.table_catalog, t.table_schema, t.table_type, t.table_name;
+
+select * from permissionless_tables;
+
+INSERT INTO test_result (test_name, success)
+select 'All tables in public have some permissions', count(*)=0 from 
+permissionless_tables;
 SELECT * FROM test_result;
 
+
 SELECT (select count(*) from test_result where success is true)
 || ' tests passed and '
 || (select count(*) from test_result where success is not true)

Modified: trunk/t/43-dbtest.t
===================================================================
--- trunk/t/43-dbtest.t	2010-03-09 04:52:19 UTC (rev 2952)
+++ trunk/t/43-dbtest.t	2010-03-09 06:30:14 UTC (rev 2953)
@@ -5,7 +5,7 @@
 	plan skip_all => 'Skipping all.  Told not to test db.';
 }
 else {
-	plan tests => 99;
+	plan tests => 100;
 	if (defined $ENV{LSMB_NEW_DB}){
 		$ENV{PGDATABASE} = $ENV{LSMB_NEW_DB};
 	}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.