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

add some more features to pg_tapgen #18

Open
marco44 opened this issue Dec 7, 2017 · 2 comments
Open

add some more features to pg_tapgen #18

marco44 opened this issue Dec 7, 2017 · 2 comments

Comments

@marco44
Copy link

marco44 commented Dec 7, 2017

Hi,

I'd like to add still more tests to pg_tapgen.

What I'd like to implement:

  • Constraints other than PK (FK, check, maybe exclusion ?). There is nothing (as far as I can see) in pg_tap right now for check constraints, I could do it with md5 like i did for function, or add the feature in pg_tap ?
  • We also had another problem: we have many functions with same name and different prototypes, and right now, the script only tests that there is a function with the name. Maybe create a file with a has_function for all prototypes of all functions ?

Please advise before I start coding :)

@marco44
Copy link
Author

marco44 commented Dec 7, 2017

I forgot one… I'd like to check for extensions versions, but maybe this should be a command line option ? (and it would have to be added to pg_tap too)

@theory
Copy link
Owner

theory commented Dec 7, 2017

  • There's has_check and col_has_check, but you're right that there isn't a function to check the body. After your previous PR, I was thinking it'd be useful to add a function_checksum_is() to pgTAP itself, which could of course be used for both.

  • Yes, more has_function calls with prototypes would be great.

  • It'd probably be useful to extend has_extension to allow a version spec to be passed to it. Might have to lock it to a specific version, though, as extensions have no standard version format.

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

No branches or pull requests

2 participants