adrianandrei-ca / pgunit

Unit test framework for Postgresql
53 stars 14 forks source link

Schema pgunit should contain all functions and types related to this test framework #15

Open sfkeller opened 4 years ago

sfkeller commented 4 years ago

Currently, when following the README, only dblink is being put into schema pgunit. All functions test_* and type test_results are being created in current (default: public) schema.

This clutters the default and/or the user schema, while there are cleaner means, like putting everything in pgunit schema.

So, the schema pgunit should contain all functions (test_*) and type (test_results) and types related to this test framework (except the specific user defined SQL script). With this one can do DROP SCHEMA pgunit; and everything is cleaned up - instead of doing many times a DROP FUNCTION....

In addition one could consider to "package" everything into a simple PostgreSQL extension.

adrianandrei-ca commented 4 years ago

You are 100% correct. I am not sure why the test unit specific functions are deployed in public. Probably was done to get the ball rolling but then development stalled. Please create a pull request if you have the resources for it and I will merge them.

On Tue, May 26, 2020 at 12:17 PM Stefan notifications@github.com wrote:

Schema pgunit should contain all functions and types related to this test framework (except perhaps the specific user defined SQL script.

Currently, when folloging the README, only dblink is being put into schema pgunit. All functions test_* and type test_results are being created in current (default: public) schema.

This clutters the default and the user schema while there are cleaner means like putting everything in pgunit schema.

Do you agree to put all functions test_* and type test_results into schema pgunit?

In addition one could to consider to "package" everything into a real PostgreSQL extension.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/adrianandrei-ca/pgunit/issues/15, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECHQ2TMTGB3NKBIHWCECHTRTPTQJANCNFSM4NKSD7IA .