Index: openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl,v diff -u -r1.24 -r1.25 --- openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 20 Apr 2004 21:13:05 -0000 1.24 +++ openacs-4/packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl 1 Jul 2004 12:47:51 -0000 1.25 @@ -717,7 +717,7 @@ } aa_register_case -cats {} -error_level notice acs_tcl__tcl_file_common_errors { - Test all known tcl files for successful parsing "(in the [info complete] sense at least)" and other common errors. + Check for some common error patterns @author Jeff Davis davis@xarg.net } { @@ -744,6 +744,25 @@ } } +aa_register_case -cats {db smoke production_safe} acs-tcl__named_constraints { + Check that there are no tables with unnamed constraints + + @author Jeff Davis davis@xarg.net +} { + switch -exact -- [db_name] { + PostgreSQL { + db_foreach check_constraints { + select relname as table from pg_constraint r join (select relname,oid from pg_class) c on (c.oid = r.conrelid) where conname like '$%' + } { + aa_true "Table $table constraints named" [string is space $table] + } + } + default { + aa_log "Not run for [db_name]" + } + } +} + aa_register_case -cats {api smoke} util__randomize_list { Test util::randomize_list } {