Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function MD5 tests are broken when extension types are in use #21

Closed
deathwish opened this issue Feb 12, 2019 · 2 comments
Closed

Function MD5 tests are broken when extension types are in use #21

deathwish opened this issue Feb 12, 2019 · 2 comments

Comments

@deathwish
Copy link
Contributor

Introduced in #17, this is because generated tests look up function body by signature, and do so using the raw argument OIDs. While type OIDs are consistent for built-in primitives, this is not true for those provided by extensions, causing tests to only work on the generating machine.

Even worse, this does not produce a test failure, instead a plan failure is raised as no body with the given parameters is found, and thus no assertion is run.

To reproduce: Create a function with an hstore parameter and generate tests. Load this function on another machine and run the tests. Expected: success. Actual: fails.

Recommend disabling this functionality until fully baked. I'm willing and able to do a PR to make it actually work, but it may be a month or two before I have time.

deathwish added a commit to deathwish/tap-parser-sourcehandler-pgtap that referenced this issue Aug 29, 2020
Also reorder the joins and conditions generated for these tests
in order to avoid a plan failure if the given function does not exist.

Cumulatively, this fixes theory#21.
@theory
Copy link
Owner

theory commented Oct 24, 2020

I believe this is fixed by #34 — thanks for the effort there!

@theory theory closed this as completed Oct 24, 2020
@deathwish
Copy link
Contributor Author

Glad I could help out, we have gotten a lot of use out of the project over the years!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants