-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
add new test cases for location header #1475
add new test cases for location header #1475
Conversation
@steve-chavez can you have a look at the failed style-check. It suggests "to reduce duplication", just because two different test-cases expect the same results and have 3 rows in common, I guess. How do I handle that? |
So I added/fixed some more test cases and implemented a part of it: location headers are currently only created for primary key columns. Not for any other columns anymore, but also not for unique columns, in case a pk is not available. That would still be to do, but requires more work, I guess, because the list of unique columns first needs to be made available there. Also fixed #1162, by always adding the primary key cols to the Still have two tests failing right now. One is expected (unique column fallback), the other one is not (unicode). @steve-chavez could you have a look at that 2nd one? Basically the response is correct, the json comparison is just in wrong order. No matter in which order I put the keys in the |
@wolfgangwalther Regarding unique columns, I also think it'd be better to leave that addition for later.
Not sure if |
…der-from-unique-column tests
@wolfgangwalther Made one last review, check my above comments. Also, please add the fixes to the CHANGELOG and then I'll merge! |
Technically one of them is a change not a fix, I guess, because if you were to make a really large TEXT column the PK on the table the actual bug in #1461 (exceeding header size limit) would still not be solved. So the "bug" is still there, although a lot less likely with the changed behaviour ;) |
@wolfgangwalther Thanks!
I think it's unlikely to have such a big text PK. So I'm calling #1461 fixed :) |
* Create location header only on primary key columns, closes PostgREST#1461 * Return location header when pk columns not selected, fixes PostgREST#1162
Just some test cases as a head start on #1461 for whoever wants to work on it (might be me, might be somebody else).
see also #1471 (comment)