-
Notifications
You must be signed in to change notification settings - Fork 95
Add has_view(:schema, :name) and hasnt_view(:schema, :name) #230
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
Conversation
Add support for has_view(schema, name)
Add support for hasnt_view( :schema, :name)
Feature request theory#219
Fix comment
Fix missing documentation.
Add tests for has_view and hasnt_view.
Update test count
Fix tests
Update expected results
De-duplicate added code. Call the (:schema,:name,:description) versions with default description.
Update test count
Try to fix tests
I got stuck on the unit-tests. I can not seem to get them to line up.
|
For one, you subtly changed the test; it used to explicitly test the description field in both cases, now it doesn't. More importantly, you're changing the calling behavior. Currently, we have:
Which ensures that the 3 different functions can be uniquely distinguished by the database just by looking at the number of arguments. Your patch is adding a |
As far as I could tell, has_table has the same problem type. There are (name, text) and (name, name). |
Using the ::name typecast works for old versions of PostgreSQL (9.1 and 9.2) I think this confirms findings of @nasbyj. The (name, text) seems to be prefered. Are there any ideas on why the explicitly typecast versions are not begin run correctly? text seems to be the preferred datatype. Use |
I think you're mis-reading the test output (which is super-easy to do). The clue is at the very end:
If you search for "updatecheck" in the test output you'll find the section where that actually runs, and that's where the failures are, which actually makes perfect sense because you haven't added an update script for doing ALTER EXTENSION pgtap UPDATE. This is a bit of a failing in our release process... after we tag a release we should really increment the version number and create the relevant (The reason 9.1 and 9.2 tests are passing is because ALTER EXTENSION UPDATE didn't exist back then, so we don't test updates there.) |
I've committed the necessary changes to master; please merge. You'll get a conflict on the update script; please keep the definition for |
Merge upstream
That fixed the tests. Thanks for the help. |
This is PoC for #219
I haven't been able to test it due to lack of suitable machine.