Closed fljdin closed 1 year ago
An interesting initiative.
So far, I have used the regression test for ora_migrator to test db_migrator. But of course that requires that you have Oracle installed, and it can only test the features that Oracle supports (as we saw with the partial index patch, where the regression tests didn't catch that I messed up your code).
Let me know when you feel confident enough about the code that I should review it.
This PR is ready for review.
I expect to get to it this week.
Would it be ok for you to develop in the testing-with-pgtap branch of this repository? Then we have fewer problems merging patches back and forth.
This PR is ready to be pushed into cybertec-postgresql:testing-with-pgtap
branch.
I'll stop working on my fork, as you already suggested before. Good catch.
I notice that some features are untested:
I think it would be great if you added some tests for these as well.
This PR adds a dedicated testing system to
db_migrator
, based on PGXS build infrastructure and pgTAP testing framework. A CONTRIBUTING.md is provided to explain how to run testing suite locally.Add a no-operation (noop) plugin that rely on file_fdw and /dev/null. From my point of view, it will deliver more immediate feedback and quality than using other plugin as we did before. User tables and partitions tables must be attached to local datafiles (.dat) to test data insertion when
with_data
is enabled onmaterialize_foreign_table()
calls.Setup script executes
db_migrate_prepare()
function and populates staging tables with convenient datasets needed by pgTAP suite. Test ordering is managed by schedule files forpg_regress
as setup must be executed before any others step, or even tables must exists before indexes creation.