Open kevinburkeshyp opened 9 years ago
Sorry, this will pass for sails-postgresql once https://github.com/balderdashy/sails-postgresql/pull/180 is merged.
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 | |
-------------------------------------------------------------------
@dmarcelino merged https://github.com/balderdashy/sails-postgresql/pull/180 so we just need to look at the others.
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).