-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Miscellaneous improvements in unit tests. #608
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
End statements with semicolons, to be consistent with the surrounding code. Added a new unit test to ensure environment variables are honored when parsing a connection string. Added a TODO to cleanup a test that emits messages using console.log(). Correct a query's syntax. Looks like a good thing to do even though the syntax doesn't matter in mocked out tests. Removed a test that tests for SELECT tags; AFAIK, SELECT commands don't emit a tag.
Very nice - thank you sir. Just as an aside: The tests are a bit of a mess honestly - they were made mostly in a time before things like mocha or node-tap existed. I have considered a few times porting them to a nicer test framework than my home grown makefile rube-goldberg machine, but I can't bring myself to do a major refactor of the tests at this point. I approached almost the entire development in a TDD style way and now that they're passing I think it's too risky to rip them all out and plop them into a more sophisticated framework. They've also accumulated a lot of small syntax ugliness over the years as other people have contributed, etc. I also neglect style guidelines a bit there because "Hey I'm already writing tests - I'm doing the right thing! I'm gonna relax a bit." So...thanks for the cleanup. 😄 One problem: one of the tests is now failing. Would you be able to fix that failing test? Afterwards I'll merge 'em all in. |
I work for EnterpriseDB, and you can say I have a vested interest in making I have updated code in commit 23b29c9. Unfortunately Travis build failed, I ran the So I think the branch is ready for merge, and because it's just test case The two failed tests ended with:
And:
On Tue, Jun 17, 2014 at 10:11 AM, Brian C [email protected] wrote:
Gurjeet Singh http://gurjeet.singh.im/ |
Postgres generally does not emit a SELECT tag after a SELECT query, but it does emit that tag after a CREATE TABLE x AS SELECT query. Example: postgres=# create table t as select 1; SELECT 1
Hi I re-added the SELECT tag test based on recent discovery. And incidentally the Travis test run also passed. So I guess this branch is ready for merge. |
a gentle bump :) |
sorry! been super busy w/ work and traveling - will merge these today. ❤️ |
Miscellaneous improvements in unit tests.
End statements with semicolons, to be consistent with the surrounding
code.
Added a new unit test to ensure environment variables are honored when parsing a
connection string.
Added a TODO to cleanup a test that emits messages using console.log().
Correct a query's syntax. Looks like a good thing to do even though the syntax
doesn't matter in mocked out tests.
Removed a test that tests for SELECT tags; AFAIK, SELECT commands don't emit a
tag.