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

Test that originalError is set for unique keys #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevinburkeshyp
Copy link
Contributor

It's set for WLError, but at least one library clobbers the original error
message when creating a WLValidationError. Test that this property exists.

Um, a little uncertain about the best practice here - I only use/care about one library, and I don't expect this to be implemented anywhere else, though I believe it should be, obviously.

Specifically: sails-postgresql currently creates its own error and discards the native Postgres error when a uniqueness check fails. I would like to keep the Postgres error around as originalError, the same way it is for any non-23505 && non-"Key ... already exists" error message. This passes for the sails-postgresql adapter (though many other tests fail; haven't looked into why).

It's set for WLError, but at least one library clobbers the original error
message when creating a WLValidationError. Test that this property exists.
@kevinburkeshyp
Copy link
Contributor Author

Sorry, this will pass for sails-postgresql once balderdashy/sails-postgresql#180 is merged.

@dmarcelino
Copy link
Member

It's not just sails-postgresql but also sails-memory and sails-mysql that are failing. Those will need fixing before we can merge this test.

https://travis-ci.org/balderdashy/waterline-adapter-tests/jobs/75691934#L606

 ------------------------------------------------------------------ 
| adapter          | version | result | failed | total | wl-sequel |
|------------------|---------|--------|--------|-------|-----------|
| sails-postgresql | dfb2229 | failed |      1 |   344 |     0.5.0 |
| sails-memory     | 4281ad7 | failed |      1 |   324 |           |
| sails-disk       | e95628b | passed |      0 |   312 |           |
| sails-mongo      | 021ec02 | passed |      0 |   312 |           |
| sails-mysql      | 1fe7b2c | failed |      1 |   349 |     0.5.0 |
| sails-redis      | ecb7795 | passed |      0 |   312 |           |
 ------------------------------------------------------------------- 

@particlebanana
Copy link
Contributor

@dmarcelino merged balderdashy/sails-postgresql#180 so we just need to look at the others.

particlebanana added a commit to balderdashy/sails-mysql that referenced this pull request Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants