This is a hard one to get right. I am trying to ignore the crap that is in
public but the public schema exists and the tests will blow up.
Public is always created in an empty database. So unless you explictly drop it
and it doesn't exist then this shouldn't cause problems.
Change description for column related tests.
The column releated tests that allow a schema require a description.
This was hard coded to 'pgtapgen'. This is useless in tests results
and makes finding the problem very difficult.
The description is now the schema.table.column_name with an suffix
to hint at which particular test it might be.
have script function handle $total_test save/restore
$total_test is a global value to simplify the code but
when script is called recursively to create a new file
$total_test needs to start counting again and be restored back
to the correct value.
use $PGPASSWORD for passwords. update Documentation.
major change to output routine.
The output routine now defaults to a string. Once all the tests
are generated the total count is used to call 'plan()' instead
of using no_plan. The output to the file is a single print
statement.
fix for test counts.
save the previous count and restore after recursive calls to script.
Escape single quotes in default values.
The default values using a sequence have single quotes that need to
be escaped.
force order of functions by names
Order By generates the same output for the same set of functions.
Support for materialized views and foreign tables.
mateiralized views generate like regular views
foreign tables generate like tables
use full schema qualified object naming.
use pgtap functions with schema arguments.
This fixes Databases with many interrelated schemas which are hard to test in isolation.
Do NOT set search_path to one schema instead use fully qualified names.
Use Cast to name to force function selection.
Add code to count total tests generated.
This is prep work for enabling acurate test count delcarations.
Remove 'create extension' in test output as that screws with simple CI
testing. Instlaling a PG extension is 1,000,000 times harder than
manually loading pgtap and run the tests.
fix a typo from commit 8162bb5b4a8ac8b600c177b314aa9a3cbd39615d
if public is excluded check it if exists.
This is a hard one to get right. I am trying to ignore the crap that is in public but the public schema exists and the tests will blow up.
Public is always created in an empty database. So unless you explictly drop it and it doesn't exist then this shouldn't cause problems.
Change description for column related tests.
The column releated tests that allow a schema require a description. This was hard coded to 'pgtapgen'. This is useless in tests results and makes finding the problem very difficult.
The description is now the schema.table.column_name with an suffix to hint at which particular test it might be.
have script function handle $total_test save/restore
$total_test is a global value to simplify the code but when script is called recursively to create a new file $total_test needs to start counting again and be restored back to the correct value.
major change to output routine.
The output routine now defaults to a string. Once all the tests are generated the total count is used to call 'plan()' instead of using no_plan. The output to the file is a single print statement.
fix for test counts.
save the previous count and restore after recursive calls to script.
force order of functions by names
Order By generates the same output for the same set of functions.
Support for materialized views and foreign tables.
mateiralized views generate like regular views foreign tables generate like tables