-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
PL/pg SQL: Add unit test framework (PGUnit), with Docker #137
Conversation
Hi Florian, great minds think alike, eh ? TLDR Full version |
1 similar comment
Hi Florian, great minds think alike, eh ? TLDR Full version |
👍 |
Hi Florent, I red your comment on the other PR, I'll keep discussing here to keep all comments together. But I think we can even go further and share more structure. I suggest to keep production code separate for test code, ending with:
And last, I saw you put a full test sample, complete with expected and actual (in plpgsql/pgunit/run_tests.sql). IMHO, the kata does not inted to supply the solution, people are expected to build their test suite by themselves. Anyway, if you don't have time left, or found this over-engineered, or expect everything to be self-supporting, let me know, keep pour PR as-is, I'll update mine according to your structure. |
I prefer to accept the 2 PR before, then create another PR to share the code. |
You're right. Let's do it, then refactor afterwards.
I updated my PR, moving all test into test/pgunit, and updated README.md
|
plpgsql/pgunit/run_tests.sql
Outdated
quality_result item.quality%TYPE; | ||
BEGIN | ||
TRUNCATE TABLE item; | ||
CALL new_item('Aged Brie', 4, 6); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example test is a little more extensive than the one I usually include in a starting position. I normally have an item called "foo" and an assertion that it is called "fixme" after update quality is called. I prefer this starting test since it fail, and gives the person doing the exercise a big clue as to what to do to make it pass. Then the person doing the exercise has to work out what a better test to write would be. Can you explain why you prefer to start with this test instead?
Hello, thankyou for the pull request. I like the approach of giving a dockerfile for easy setup of the database. I had a small comment about the starting unit test. Do you think you could address that? Also, can both you contributors agree which pull request I should accept, or perhaps I should accept both? |
Hello, I agree with your comment concerning the starting unit test. |
Hi Emily, Anthony and me agreed on this timeline: master / PR136 / PR137. |
Anthony, you may change PR name to "PL/pg SQL: Add unit test framework (PGUnit), with Docker" |
change test with foo example to fixme
It's done :) |
Thankyou! |
Hi @acassaigne, look like you create your branch from emilybache, not from my PR. |
PL/pg SQL: Add unit test framework (PGUnit), with Docker
Translate by @acassaigne and me